Ivan Tarapov wrote:
Russel,
I got freetype from CVS - there were some differences from the 2.2.1 version
I am using, but the problem with calculation of CBox for space character is
not fixed.

Basically the code is like this:

error = FT_Load_Glyph(face, curchar, FT_LOAD_DEFAULT);
.....
error = FT_Get_Glyph(face->glyph, &glyph);

the result is success for space character (curchar=3)

FT_Glyph_Transform(glyph, 0, &pos);

FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_pixels, &bbox);

From FT_Glyph_Get_CBox the function FT_Outline_Get_CBox( &glyph->outline,
bbox ); is called

Inside this function the check is made
if ( outline->n_points == 0 )

Naturally, the check fails for space char, because it doesn't have any
n_points as far as I recon. Maybe the routine for determining the size of
space character us different?

Hi,
The control-box probably isn't the right way to determine the glyph sizes.

I use face->size->metrics (FT_Size_Metrics) for scaleable fonts. I haven't got
around to working with bitmap fonts yet.

If you use FT_Glyph_Transform, hinting information is lost IIRC.


_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to