freetype
[Top][All Lists]
Advanced

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

Re: [ft] Size of space character


From: Mickey Gabel
Subject: Re: [ft] Size of space character
Date: Sun, 15 Feb 2009 18:56:01 +0200
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

AlannY wrote:
Werner LEMBERG wrote:
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?

[...]

FT_Glyph_Get_CBox (glyph, FT_GLYPH_BBOX_PIXELS, &bbox);
That you get a zero CBox is correct -- there is NO outline at all!
What do you expect?  A space glyph usually has a non-zero advance
width (and height for vertical layout).


    Werner


And what can I do? I need a width of space for rendering text...

What I do (after encountering the same issue and talking with Werner) is to the advance as the width of a space. It makes the code slightly less uniform (need special handling for "empty" glyphs) but it works just fine for me.





reply via email to

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