producing pixel-identical images of text between Sun Java and OpenJDK

Posted by yuvi on Stack Overflow See other posts from Stack Overflow or by yuvi
Published on 2010-05-05T18:11:49Z Indexed on 2010/05/05 18:18 UTC
Read the original article Hit count: 554

Filed under:
|
|

My release script produces images of the version number to save me the trouble of manually going into the MoinMoin wiki software and changing it by hand for each release. Unfortunately, since the fonts look a little different on each platform's JVM, the result is ugly.

I solved the the font inconsistency by using Lucide Sans (comes with every Java system). (Loading Fonts from TTF files was another option, but was buggy on Mac Java). The result is much better, producing the exact same image on Mac/Windows (), but a slightly different one on OpenJDK ().

I believe this is caused by OpenJDK having a different font rendering system (as opposed to different fonts). Is there any way I can get all three of my target platforms (Sun Windows, Mac, OpenJDK Linux) to produce images of text that look identical?

© Stack Overflow or respective owner

Related posts about java

Related posts about fonts