I am trying to present some text on a PNG, which is using the FreeType / TrueType in the Galang project Used to be. As you can see from an attachment, I am trying to render 4 characters in the column - each letter is centered in the column. The truetype API is used to get the width and width of the glow but I can not be converted to give accurate offset for each glyph, for example with the O
glyph, the font is used While I get the following dimensions:
Hertricks {Advance: 543 left sidebearing: 36} bounds {XMin: 0 YMin: -64 XMax: 512 YMax: 704} Advance width: 512 < / Code> <
Size: = 125.00 Tile Off Aet: = (int (TileWed): / p>
* I) + Int (tileWidth / 2) pt: = freetype.Pt (tileoffset, (IMGH -NightWhite) -Inter (size ))
How can I return the returning glyph dimension correctly to offset the characters truetype? I have tried to use AdvanceWidth
as a detailed code (line 160) but it does not give me a consistent result in all the glyphs.
As suggested by Simon, using the correct solution AdvanceWidth:
Crude Example:
No comments:
Post a Comment