freetype
[Top][All Lists]
Advanced

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

Re: [ft] Small advance/spacing problem


From: Mickey Gabel
Subject: Re: [ft] Small advance/spacing problem
Date: Tue, 08 Jul 2008 10:03:45 +0300
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

Daniel Wyatt wrote:
I'm working on a small library called sfmlTTF which provides me with
the features SFML's sf::String lacks.
But I'm having a small problem.
See this image:
http://i107.photobucket.com/albums/m300/silentdae/Test.jpg

The cyan lines are the x advance.
The bottom string was drawn with my code.
The top string was drawn with someone else's code.
Notice how they aren't aligned exactly the same.
In particular, the advance of the 'i' looks like it's way off.

Both strings were drawn with the same font and same size, neither using kerning.
I have looked through the other person's code plenty but I can't spot
any major differences.

I'm just wondering if anyone could guess why this would happen.
Here is the relevant portion of the code:
http://pastebin.com/m50ab661


It's just a guess, but it looks as if the code doesn't take into account that glyphs can start on the left side of the pen. It doesn't take into account mFace->glyph->bitmap->left and mFace->glyph->bitmap->top.
However I'm no expert, so it might not be that :)






reply via email to

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