Index: [thread] [date] [subject] [author]
  From: =?iso-8859-1?Q?Niklas_H=F6glund?= <niklas@canit.se>
  To  : ggi-develop@eskimo.com
  Date: Sat, 22 May 1999 10:09:31 +0200

Re: font quaestion

On Fri, May 21, 1999 at 06:10:36PM -0400, Brian S. Julin wrote:
> On Fri, 21 May 1999, Mike McQuade wrote:
> > Can I have more than one font type / size on screen
> > with GGI ?
> 
> ggiPutc is really meant only for debug purposes.  You have to
> draw your own fonts right now.  There have been a couple
> of starts on a helper library for this.  It would be nice
> to get everyone who needs font support together and really
> get a standard font helper library banged out.

I've made some routines to draw text using the freetype library. They
can only use one font at a time, but that could be changed with a
cleverer caching strategy. (Currently I draw all characters into an
offscreen area, and ggiCopyBox them when drawing.)

There's still a bug left in the code, though. I seem to do something
wrong, because when I ggiCrossBlit the characters from a temporary
memory visual (where the freetype library draw them) to a virtual area
of the main visual, I only get the left third of every character. I
solved this by ggiCrossBlit:ing a hundred more pixels than the
characters width, but I still get garbage at the rightmost pixels on
every line (of the part of the main visual where the characters are
cached). (I don't calculate the width of the characters wrong).

I'll have to look more into this, and pinpoint the exact error, but I
don't have time for this the next few days.

-- 
						Niklas

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