freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Debugging API for truetype?


From: David Turner
Subject: Re: [Devel] Debugging API for truetype?
Date: Wed, 15 May 2002 00:28:53 +0200

Hello George, Just, and others,

Just van Rossum a écrit :
> 
> George Williams wrote:
> 
> >     I have been thinking for a while about writing a truetype debugger so
> > that I could single step a truetype glyph's instructions and watch its
> > points move (and figure out more easily where pfaedit's hinting is wrong).
> >     I would like to use freetype to execute instructions, which (I think)
> > means expanding the API.
> >     I fear that this expansion is unlikely to be useful to anyone but me
> > (possibly you too) and therefore you will prefer not to have it folded in
> > to your main cvs branch. But on the off chance that you might be interested
> > I thought I'd run it past the mailing list...
> 
> FWIW: I would be interested in such an API also...
>

Believe it or not, this feature is already implemented in FT2 :-)
Have a look at the file "src/ttdebug.c" located in the "ft2demos" module

It's a command-line debugger that does everything you need, and it shouldn't
be too difficult to modify to incorporate within PfaEdit or other kinds of
editors..

Its only drawbacks for now are the following:

  - it includes internal FT2 headers located in "src/truetype", since
    there is no "official" internal interface to the TrueType hinter.

    It should be possible to define one however, but I'll leave that
    as an exercise to the reader (read: contributions welcomed :o)


  - it can only be compiled using one of these methods:

      * with Jam:

          define the environment variable FT2_DEBUG_TT, then invoke
          "jam" to compile all demo programs. You should then have
          a nice "ttdebug" program in the "objs" directory


      * manually:

          compile "src/ttdebug.c", adding the path to "freetype2/src/truetype"
          to your C include path. Link it to FreeType, and voila

This tool is extremely similar to the "fdebug" that comes with FreeType 1.x,
and I've been using it to spot differences between the two engines (I have
only spotted 100% of the bugs that caused different monochrome rendering
between them recently, i.e. after 2.1.0, but all is in the CVS
right now)

You can use it to debug either glyph programs or "prep". Invoke it with
no arguments for a usage description...

Hope this helps,


Regards,

- David Turner
- The FreeType Project  (www.freetype.org)



reply via email to

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