From: Dave Calkins <dave@ki...> - 2010-01-26 16:37:17
I'm rendering text to OpenGL via FreeTypeGL on Windows 7.
The font face is "Arial Unicode MS" (loaded from
"C:\Windows\Fonts\ARIALUNI.TTF") and is sized to 9pts at 96dpi.
When comparing the rendering of this text using the Windows GDI APIs vs.
the FreeType rendering I'm seeing a small difference. The GDI rendering
results in a slightly wider string.
I took a closer look and the individual letters are the same size, but
the intra-letter spacing is slightly larger for some of the letters with
the Windows GDI rendering.
This suggests to me that the kerning is not exactly the same. Are there
any parameters I might need to be tweaking to get the kerning to match
Windows GDI rendering?
I sent this question originally to the FreeType mailing list, and
received the below response and so thought I'd send it here in case this
was something in the GL side of things.
I suspect that OpenGL only uses the kerning from the `kern' table,
while MS Windows uses the kerning from the `GPOS' table (Arial is an
OpenType font, AFAIK) which usually contains much more kern pairs and
probably even different values.