[OpenJDK 2D-Dev] Font question

Phil Race Phil.Race at Sun.COM
Wed Apr 16 21:31:35 UTC 2008


Roman Kennke wrote:
> Hi there,
> I have a problem related to fonts. As you might know, I'm hacking on the
> OpenJDK challenge thing and try to implement an external toolkit/J2D
> pipeline based on external and internal interfaces etc. Progress is
> pretty good so far, as can be seen here:
> http://kennke.org/blog/2008/04/16/caciocavallo-prototype/

Is the text on that "Swing Activity Board" what we are supposed to be 
looking at?
> However, there seems to be a problem related to fonts. To me, it looks
> like they are not hinted properly. My TextRenderer implementation is
> very simple and straightforward:

The only control for font hinting is how the rasteriser - freetype - is 
If your copy of libfreetype is built with hinting turned off, then that 
will make a difference.
The usual compensation for that is antialiasing the text.
Still that looks pretty grotty, maybe there's something more to it, like 
a font that
wasn't very amenable to auto-hinting, although it looks like a fairly 
straightforward sans font,
I notice the text in the window manager title bar that presumably comes 
from your desktop
may be the same font and its greyscale and looks like it would also be 
grotty in B&W.         


> http://kennke.org/~hg/hgwebdir.cgi/caciocavallo-ng/file/943a30f0ce78/src/gnu/java/awt/peer/x/EscherTextRenderer.java
> But I guess it is not really the problem, because the pixels are already
> arriving badly there.
> Is there another point that controls this behaviour? Something in
> FontConfiguration or FontManager maybe? (BTW: I re-engineered the
> FontManager stuff - and other - quite a bit, but if you point me to a
> place in the current OpenJDK version, I could map it to mine).
> For completeness, the code to the toolkit is here:
> http://kennke.org/~hg/hgwebdir.cgi/caciocavallo-ng/
> You'd also need Escher:
> http://escher.sourceforge.net/hg/escher-trunk/
> and our patches to the OpenJDK tree:
> http://kennke.org/~hg/hgwebdir.cgi/openjdk-patches/
> Cheers, Roman

More information about the 2d-dev mailing list