[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] diff Pixel height
From: |
Werner LEMBERG |
Subject: |
Re: [ft] diff Pixel height |
Date: |
Tue, 16 Feb 2010 23:39:24 +0100 (CET) |
Samaram,
I've now found some time to answer this your question:
> I am using Arial.ttf file [at 12px/72dpi], [...] I am getting x min
> for few characters as -1 [after a call to compute the CBox]. Is it
> correct?
Yes. Have a look at the attached image, from a debugging session with
FontForge. It shows the outline of glyph `A' from arial.ttf at 12px
with 72dpi, after hinting has been applied. The hinting engine moves
point 0 to the left so that it eventually gets a negative x value.
After rounding, this becomes -1. Similarly, point 3 gets moved to the
right, causing the xmax value to be 8. In other words, the CBox of
the hinted glyph `A' is two pixels wider than necessary.
Always bear in mind the following warning from the description of the
`bbox' field in FT_FaceRec:
Note that the bounding box might be off by (at least) one pixel for
hinted fonts. See @FT_Size_Metrics for further discussion.
In the description of FT_Size_Metrics:
[...] Indeed, the only way to get the exact metrics is to render
_all_ glyphs. As this would be a definite performance hit, it is up
to client applications to perform such computations.
Werner
- Re: [ft] diff Pixel height, samaram s, 2010/02/01
- Re: [ft] diff Pixel height, Werner LEMBERG, 2010/02/02
- Message not available
- Re: [ft] diff Pixel height,
Werner LEMBERG <=
- Re: [ft] diff Pixel height, samaram s, 2010/02/17
- Re: [ft] diff Pixel height, Werner LEMBERG, 2010/02/17
- Re: [ft] diff Pixel height, samaram s, 2010/02/18
- Re: [ft] diff Pixel height, Werner LEMBERG, 2010/02/18
- Re: [ft] diff Pixel height, samaram s, 2010/02/22
- Re: [ft] diff Pixel height, Werner LEMBERG, 2010/02/22
- Re: [ft] diff Pixel height, samaram s, 2010/02/22
- Re: [ft] diff Pixel height, Werner LEMBERG, 2010/02/23