freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype] Font bounding box?


From: Marcelo E. Magallon
Subject: Re: [Freetype] Font bounding box?
Date: Thu, 25 Oct 2001 09:12:43 +0200
User-agent: Mutt/1.3.23i

>> address@hidden writes:

 > Have you had a look at FTGL. 

 Yes, I discovered it just about 5 minutes after sending my mail.
 Thanks a lot, you have saved me a whole load of work :-)  BTW, nice
 design, much better than gltt's -- this is basically what I was set on
 to do.  Can we discuss some issues regarding the library (autoconf'ing
 it, writing some docs, finishing some stuff, maybe merging with GLTT?)
 Would the GLTT mailing lists be a good place for this?

 > I had some problems with this also. Initially I used the scaled
 > height and width but there is no guarantee that the glyph wont extend
 > outside these bounds so I changed to the bounding box. But there are
 > still some things to watch... 

 Same here.

 > Some font formats have there bbox stored incorrectly. The bbox is
 > supposed to be in font units but sometimes it's stored in 16.16 fixed
 > float. I'm not sure if this has been fixed in 2.0.5 

 Ah, that might explain why I got some results that made half-sense when
 I used >> 16.

 >              height =  height * ( (float)ftSize->metrics.y_ppem / 
 > (float)(*ftFace)->units_per_EM); 

 isn't that what FT_MulDiv does?

 > And by the way... "the result should be pixels" It depends what you
 > mean by pixels. Texels yes, screen pixels not necessarily. 

 yes, for this particular application, texels.

 >  >  The other thing I noticed is that the advance is not constant, 
 >  > which I 
 >  >  kinda expected for monospaced fonts...  what did I miss? 
 >  > 
 >  
 > Sorry, can't help with this one. I jumped straight in and implemented 
 > all fonts. 

 I actually started out working with any font, but at some point I
 realized I was not understanding something regarding font metrics, and
 fell back to monospaced fonts.

 Thanks,


 Marcelo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]