[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] Problem with irregular letter spacing
From: |
Markus Ewald |
Subject: |
[Freetype] Problem with irregular letter spacing |
Date: |
Sun, 08 Feb 2004 13:46:12 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.4) Gecko/20030619 Netscape/7.1 (ax) |
Hi!
I'm using FreeType 2.1.4 to display text in a direct3d application.
While I'm perfectly pleased with the quality of the individual glyphs,
I've noticed some irregularities in font spacing with my implementation
which don't appear to exist at the freetype demonstration at
http://mbox.troja.mff.cuni.cz/~peak/ftdemo/index.cgi (although that one
seems to be using freetype 1)
Maybe an image can better describe my problem:
http://www.lunaticsystems.com/data/ttf_font_spacing.png
The last 's' in 'systems' is far away from the 'm'; in the next two
words, the 'e' merges with the letter after
My procedure for rendering a string of text is as follows:
o Load the typeface using FT_Open_Face()
o FT_Set_Pixel_Sizes()
o x <<= 6; y <<= 6;
o for each letter {
o Blit glyph bitmap at (x>>6) - glyph->bitmap_left, (y>>6) +
glyph->bitmap_top
o x += glyph->advance.x;
o y += glyph->advance.y;
o }
Thanks,
-Markus-
- [Freetype] Problem with irregular letter spacing,
Markus Ewald <=