[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] first draft of a patch to add kerning support to the PFR mo
From: |
David Turner |
Subject: |
Re: [Devel] first draft of a patch to add kerning support to the PFR module |
Date: |
Fri, 21 Jun 2002 09:49:50 +0200 |
Hi Sven,
Sven Neumann a écrit :
>
> Hi,
>
> attached is a first version of a patch that adds support for kerning
> to the PFR module. Since I haven't found any fonts that contain the
> extra data item type 4 that provides kerning info this patch is
> absolutely untested. If anyone knows of a PFR0 font that has kerning
> information please let me know.
>
> Since this is my very first try on contributing something to FreeType,
> I'd very much appreciate if one of the core developers could have a
> short look and point me to any stupid mistakes I've made or correct my
> coding style.
>
I've commited your patch to the CVS and it seems to work well. Note that
I had to make the following (very light) changes:
- renaming "pfr_get_kerning" to "pfr_face_get_kerning", since for
the 2.1.x branch, the convention is now to use the ft_<object>_<action>
syntax to make things clearer.
- fixed the binary search in "pfr_get_kerning", since it ignored the
trivial case where there is a _single_ pair in the table.
- getting rid of "fprintf( stderr, ... )" and replacing them with
"FT_TRACE2(( ... ))" instead.
By the way, if you're interested in printing debugging output
during development, you should do the following:
- define the FT_DEBUG_LEVEL_TRACE in "ftoption.h" and recompile
the library
- when executing a program, define the FT2_DEBUG environment variable,
it value must have the following format:
<component1>=<n1> <component2>=<n2> ....
where <componentX> is the name of one of the FreeType components
(their list is in <freetype/internal/fttrace.h>) or the value
"any" to indicate all of them.. <nX> is the trace level, from 0 to 6.
for example:
export FT2_DEBUG="any=2 pfr=4"
means: all components use tracing level 2, except the PFR one that
uses tracing level 4.
Note that this doesn't work in the 2.0.x branch, if I remember
correctly. Hope this information will be useful to other people
as well
All things considered, it's a very good patch and you followed the coding
conventions very closely. Congratulations and thanks a lot for
submitting your patch :-)
Regards,
- David