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 :)
_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype