[Top][All Lists]

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

[ft] Glyph Advance when using the Image Cache

From: Moore, Thomas C1
Subject: [ft] Glyph Advance when using the Image Cache
Date: Thu, 13 Jul 2006 17:17:20 -0500

I'm working on writing a font system that utilizes FreeType2, but I'm runnin ginto a problem when using the Image Cache to cache my glyphs.
If I bypass the image cache and just use FT_Load_Glyph, then the glyphs are correctly loaded in the the GlyphSlot. However, when I use FTC_ImageCache_Lookup, the advance vector in the glyph does not appear to be set correctly. For example, when using a size 22 Arial font, the asvance.x = 917504, and advance.y = 0. When I use FT_Load_Glyph, I get a more reasonable value of advance.x = 896. If you look at these numbers, 917504 / 896 = 1024, so I've noticed that if I copy the glyph I get from FTC_ImageCache_Lookup, then divide its advance.x by 1024, then it seems to work.
Any other ideas?
Thomas Moore
ADP - Software Engineer
Lockheed Martin Aeronautics Company - Fort Worth

reply via email to

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