TrueType gridfitting in Classpath

During the last couple of days I finally got my hands a little dirty with hacking the first bits of the TrueType gridfitter for GNU Classpath. Gridfitting is a key technology in TrueType font rendering, as otherwise you might get very bad rasterization, with buckles and missing pixels etc.

My goal is to adapt the automatic gridfitter from FreeType in pure Java. This will bypass the TTF bytecodes that Apple holds patents on. This seems fairly straightforward as the FreeType code is nicely clean (well mostly), and even implements some kind of object orientation. My guess is that I
will have something working by the end of the year, maybe earlier.

I’m trying to design this carefully, so that we can probably plugin the real TTF gridfitter when the patent expires some day. For the start I will implement the gridfitting for Latin chars only, but leave room for extensions (this interface also adapted from FreeType) so that this can be implemented for CJK and other fonts too.
When this thing is finished, we will have a reasonable usable 100% Java font rendering stack in GNU Classpath, the core TTF engine by Sascha plus the rasterizer (AbstractGraphics2D) and the gridfitter by myself. This might not be of much use in a desktop Linux world, as we already can use the CairoGraphics2D and FreeTypeGlyphVector implementations directly. It will be useful however for embedded systems, all platforms where we don’t have FreeType/Cairo (.NET maybe?) and projects like JNode. And for people who happen to like pure Java, if only for the fun of it 😉 Stay tuned for updates.

PS: This work will even be accompanied by extensive documentation about the inner workings, as I have to do something like this as part of my study.


2 Responses to TrueType gridfitting in Classpath

  1. Avi Alkalay says:

    Check this.

    Its part of the TLDP’s Linux Font HOWTO.

  2. roman says:

    Thank you. How is this related to my work, except that it mentions the FreeType autohinter that I am about to adapt to Java?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: