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 Calkins
Subject: Re: [ft] putting text in a box
Date: Thu, 21 Jan 2010 10:12:45 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1

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.




reply via email to

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