freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft] Size of space character


From: AlannY
Subject: [ft] Size of space character
Date: Sun, 15 Feb 2009 15:48:08 +0300
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Hi there, I'm AlannY.

I'm writting a tool which return size (width and height) of glyph
(character). Everything works fine for every character, but not for
space character ;-( How to get size of space?

Here are some example:

glyph_index = FT_Get_Char_Index (face, ' ');

FT_Load_Glyph (face, glyph_index, FT_LOAD_DEFAULT);

FT_Get_Glyph (face->glyph, &glyph);

FT_Glyph_Get_CBox (glyph, FT_GLYPH_BBOX_PIXELS, &bbox);

printf ("Width: %d\n", (int)(bbox.xMax - bbox.xMin));
printf ("Height: %d\n", (int)(bbox.yMax - bbox.yMin));

The output for ' ' is:
Width: 0
Height: 0

Freetype 2.3.6 for windows ;-)




reply via email to

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