Re: [ft] putting text in a box

2010-01-21 Thread Werner LEMBERG
As I told you earlier: A negative bbox value descends below the baseline (which has y=0). How could a bounding box represent both the overall size of the glyph and the descent at the same time? Sorry for being imprecise. A bbox consists of four values: The (x,y) values of the lower left

RE: [ft] putting text in a box

2010-01-21 Thread David Bevan
January 2010 07:42 To: d...@kinematics.com Cc: freetype@nongnu.org Subject: Re: [ft] putting text in a box As I told you earlier: A negative bbox value descends below the baseline (which has y=0). How could a bounding box represent both the overall size of the glyph and the descent

Re: [ft] putting text in a box

2010-01-21 Thread Dave Calkins
For reference, a good link is also the below, scroll to the bottom which talks about positioning glyphs on a bitmap of specified size and it also mentions subtracting the lower left corner of the bounding box from the pen pos to get the actual glyph aligned with the box.

Re: [ft] putting text in a box

2010-01-20 Thread Dave Calkins
It seems like the bounding box calculation is always correct. The problem is that the descender I'm querying is for the font face in general which I assume accounts for every glyph in the font. If you have a negative value in the bbox, this is the amount below the baseline. I'm

Re: [ft] putting text in a box

2010-01-20 Thread Dave Calkins
Thanks, I'll try both of those. Do you know, though, of a way to get the descent value for an individual glyph reliably for any font? On 1/20/2010 9:51 AM, Werner LEMBERG wrote: If you have a negative value in the bbox, this is the amount below the baseline. I'm not getting negative

Re: [ft] putting text in a box

2010-01-20 Thread Werner LEMBERG
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. Werner

Re: [ft] putting text in a box

2010-01-20 Thread dave
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

Re: [ft] putting text in a box

2010-01-20 Thread Werner LEMBERG
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

Re: [ft] putting text in a box

2010-01-20 Thread dave
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? Yes. How does that yield the information I need, namely the distance