Creating Pixelated Identical Text Images Between Sun Java and OpenJDK
My release script generates version number images to save me the trouble of manually going into the MoinMoin wiki software and manually changing it for each version. Unfortunately, since fonts look a little different on every JVM platform, the result is ugly .
I solved the font inconsistency using Lucide Sans (comes with every Java system). (Loading fonts from TTF files is another option.) The result is much better, producing the same image on Mac / Windows ( http://img718.imageshack.us/img718/9089/winq.png ), but slightly different from OpenJDK ( http://img441.imageshack.us/img441/4247/openjdk.png ).
I believe this is because OpenJDK has a different font rendering system (as opposed to different fonts). Is there a way to get all three target platforms (Sun Windows, Mac, OpenJDK Linux) to create images that look the same?
[Update: the ugly link is no longer ugly as I fix things manually until I find an automatic solution]
a source to share
OpenJDK uses the system's font rendering library, so you might not even get the same font rendering across different distributions or Linux versions.
Also, you can't even assume Lucida Sans is available because OpenJDK doesn't install it, it's only in the Sun JDK.
The only solution is to deploy your own OpenJDK platforms for Windows and Mac and make sure it still uses Freetype instead of the platform's font rendering library. But it doesn't work.
a source to share