freetype
[Top][All Lists]
Advanced

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

Re: [ft] putting text in a box


From: dave
Subject: Re: [ft] putting text in a box
Date: Wed, 20 Jan 2010 23:37:39 -0000 (GMT)
User-agent: SquirrelMail/1.4.13

>
>> Do you know, though, of a way to get the descent value for an
>> individual glyph reliably for any font?
>
> Normally, computing the cbox (or the bbox, to be absolutely sure for
> the weird cases which shouldn't happen with well designed fonts)
> should do the right thing.
>

I guess this is what's confusing me.  I looked at the tutorial code for
getting the cbox, for example, and the result of the call is just that, a
box.  So that would be a box which completely enclosed the glyph right? 
How does that yield the information I need, namely the distance below the
baseline which the glyph extends?

If I have a box which encloses the glyph, then I could use that
information to figure out how much space I need.  However, when I render
the text at position X, Y that position sets the baseline of the text.  So
I'm still stuck figuring out how far below that baseline my glyphs will
go.  Without knowing that, I can't put text into a box.





reply via email to

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