[OpenJDK 2D-Dev] Font Metrics in OpenJDK vs Sun JDK
Ben Loud
Ben.Loud at rlmgroup.com.au
Thu Jun 12 10:21:56 UTC 2008
2D Folk,
Since working with OpenJDK, I've notice that text just doesnt look right. I made a simple comparison between Sun's JDK6 and OpenJDK see: http://benloud.com/fonts.png You can see there are clearly significant differences in the horizontal character spacing, particularly noticable in "Beagle" and "Spirit", and also the heights are different. I also compared the font metrics of a string:
For Tahoma, plain, 11pt, "The Quick Brown Fox Jumped Over The Lazy Dog."
AWT FontMetrics:
Ascent Descent Leading Height String Width
Sun JDK: 11 3 0 14 241
OpenJDK: 11 3 -1 13 265
TextLayout:
Ascent Descent Leading Advance Bounds
Sun JDK: 11.005371 2.2719727 0.0 240.0 [x=0.0,y=-8.359375,w=238.29688,h=10.625]
OpenJDK: 11.0 3.0 -1.0 264.0 [x=0.0,y=0.0,w=263.29688,h=18.453125]
Again you can see there are significant differences, particularly in the advances and bounds, and the -1 for leading is a bit odd.
Will it be possible to get metrics that are consistent with Suns JDK? Because right now, Swing apps on OpenJDK look quite wrong to me.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20080612/696ff442/attachment.html>
More information about the 2d-dev
mailing list