[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Kerning support in freetype
From: |
Russell Shaw |
Subject: |
Re: [ft-devel] Kerning support in freetype |
Date: |
Wed, 23 Aug 2006 00:07:05 +1000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060205 Debian/1.7.12-1.1 |
Dmitry Timoshkov wrote:
"Russell Shaw" <address@hidden> wrote:
1) freetype docs claim that FT_Get_Kerning returns values in 26.6
format, but it looks like they are not.
It is 26.6, because i've been using it.
2) is it possible to get a number of all available kerning pairs?
looking at the freetype sources it seems ft has all the info, just there is
no way to get it.
Probably no function to do that, because why would you need to?
I need it to implement behaviour of a win32 API GetKerningPairs, which
is able to return total amount of kerning pairs available. I don't see
why that info shouldn't be available for an application which wants to
cache it for any reason.
If freetype has already loaded all the pairs from the file, then cacheing
wouldn't be needed (unless you really need them all to emulate some api).
3) returned kerning doesn't match Wndows one, probably due to 1).
Must be a bug.
I'm attaching my test program. Using FreeType from CVS it prints:
face Arial Regular has kerning
kerning between 32 and 65 is -2:0
kerning between 32 and 84 is -1:0
kerning between 70 and 44 is -3:0
which is a bit small for a 1200 pixels font face.
Note that your printfs are dividing by 64 (>>6).
Using Win32 API GetKerningPairsW I get:
wFirst 32, wSecond 65, iKernAmount -59
wFirst 32, wSecond 84, iKernAmount -19
wFirst 70, wSecond 44, iKernAmount -119
which looks reasonable for a 1200 pixel sized font face.
After taking out the >>6 in the printfs, i get:
face Arial Regular has kerning
kerning between 32 and 65 is -66:0
kerning between 32 and 84 is -22:0
kerning between 70 and 44 is -133:0
using: /usr/share/fonts/truetype/msttcorefonts/arial.ttf
The differences might be due to the screen resolution not
being set in FT_Set_Char_Size().
- [ft-devel] Kerning support in freetype, Dmitry Timoshkov, 2006/08/22
- Re: [ft-devel] Kerning support in freetype, Russell Shaw, 2006/08/22
- Re: [ft-devel] Kerning support in freetype, Dmitry Timoshkov, 2006/08/22
- Re: [ft-devel] Kerning support in freetype,
Russell Shaw <=
- Re: [ft-devel] Kerning support in freetype, Dmitry Timoshkov, 2006/08/22
- Re: [ft-devel] Kerning support in freetype, Russell Shaw, 2006/08/22
- Re: [ft-devel] Kerning support in freetype, Dmitry Timoshkov, 2006/08/22
- Re: [ft-devel] Kerning support in freetype, Russell Shaw, 2006/08/22
- Re: [ft-devel] Kerning support in freetype, David Turner, 2006/08/24
- Re: [ft-devel] Kerning support in freetype, Dmitry Timoshkov, 2006/08/28