Index: [thread] [date] [subject] [author]
  From: Evan Martin <txs@concentric.net>
  To  : ggi-develop@eskimo.com
  Date: Wed, 28 Apr 1999 21:14:38 -0700

Re: GgiPuts and Co...

The advantages of my system are:
1) It doesn't depend on your target having either freetype or the
particular .ttf that you want to display.

2) It will be faster, because the font is prerendered.  

3) Prerendering doesn't require much memory: the final file is only
around 20k pixels (20811 for verdana rendered at 21 pixels high, and
that's rather tall for a game to use...)

Of course, if you were writing something that needed management of
fonts, or font selection, you would need a library like the one being
discussed.  However, as a quick hack for projects like games that just
need to have something that looks slightly better than the standard
ggiPuts() font, I think prerendering is the way to go.

Extra issue:
I'm sure there are also licensing issues with distributing .ttf.  Does
anyone know about this?  And would these issues apply with a prerendered
picture?  (Making a picture using a commercial font is ok, right?)

BERNARD Sebastien wrote:
> 
> Not quite so.
> I think (and andrea too) that we could cache all the rendered glyph.
> So you can render an whole font into a bitmap then do some blitCopy between
> the visual of the rendered font and the screen.
> If we can be smart enough about the cache rendering, we could provide either
> the
> capability of rendering an whole font or rendering just the needed glyphs
> (i.e. characters).
> The point is that you often need a subset of the font (e is more common than
> z which is
> more common than the '|'). So if you are not short on memory, then you just
> have to pay at
> startup time.
> 
> > -----Message d'origine-----
> > De:   Evan Martin [SMTP:txs@concentric.net]
> > Date: mardi 27 avril 1999 20:11
> > À:    ggi-develop@eskimo.com
> > Objet:        Re: GgiPuts and Co...
> >
> > In a real-time application, I fear truetype(freetype) would be too slow.
> > I've written a program that takes a truetype font and generates a .pnm
> > (picture) and a .h file with the x-coordinates of the letters from the
> > picture.  That way, it's easy to draw a letter, particularly after
> > someone writes some surface blitting code for ggi.
> >
> > It's rather integrated into the source of my project, but if anyone's
> > interested, I could split it out.

-- 
Evan Martin - txs@concentric.net - http://e.x0r.ml.org

Index: [thread] [date] [subject] [author]