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.
http://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-7.html
On 1/21/2010 10:12 AM, Dave Calkins wrote:
Thanks a ton for the help! Sure enough, my code was considering the
overall size from the bbox (upper right - lower left) but I hadn't
considered the fact that a negative lower left point was exactly the
information I needed :) Live and learn!
I'm able to now subtract the lower left x and y from my pen position
and the result is the text itself is "flush" against the desired
position.
On 1/21/2010 2:42 AM, Werner LEMBERG wrote:
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 (llx,lly) and the upper right (urx,ury)
corner. A box of a glyph with a descender looks like this:
(urx,ury)
+----------+
| |
| |
| |
| |
------+----------+------ baseline (y = 0)
| |
+----------+
(llx,lly)
If I say `a negative bbox value' I've meant that lly< 0; the
descender is thus simply the value of lly.
_______________________________________________
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype
_______________________________________________
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype