freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Kerning support in freetype


From: Dmitry Timoshkov
Subject: Re: [ft-devel] Kerning support in freetype
Date: Tue, 22 Aug 2006 21:33:15 +0900

"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.

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.

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.

Thanks.

--
Dmitry.

Attachment: ft_kern.c
Description: Text document


reply via email to

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