[OpenJDK 2D-Dev] JDK-8017773: OpenJDK7 returns incorrect TrueType font metrics

Yasumasa Suenaga suenaga.yasumasa at lab.ntt.co.jp
Mon Feb 3 06:12:12 UTC 2014


Hi all,

My customer encountered this issue.
I think this issue is caused by Bug 1435 [1] and 1659 [2] in IcedTea.

I read source code of "freetype-2.5.0-4.fc20" .
Bold style should affect Font Glyph only. However, current implementation
of OpenJDK affects Font Face. Thus value of Ascent/Descent is incorrect.

OracleJDK seems to use sun.font.T2KFontScaler to calculate these values.
So this issue occurs in OpenJDK only.


I think we need to merge patches of Bug 1435 and 1659 in IcedTea
to fix JDK-8017773 .

Could you merge these patches ?
Please cooperate.


Thanks,

Yasumasa


[1] http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1435
[2] http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1659


------ D E T A I L S ------

I've created testcase as "JavaApplication1.java" .
Result as:

OracleJDK 6 Update 31
----------------
[root at RHEL6-5 font]# /usr/local/jdk1.6.0_31/bin/java JavaApplication1
JDK: 1.6.0_31
    VM: Java HotSpot(TM) 64-Bit Server VM

java.awt.Font[family=IPAMincho,name=IPAMincho,style=plain,size=50]
     Ascent:  43.99414
     Descent: 6.0058594

java.awt.Font[family=IPAMincho,name=IPAMincho,style=bold,size=50]
     Ascent:  43.99414
     Descent: 6.0058594
----------------

OpenJDK7 (in RHEL6.5)
----------------
[root at RHEL6-5 font]# java JavaApplication1
JDK: 1.7.0_45
    VM: OpenJDK 64-Bit Server VM

java.awt.Font[family=IPAMincho,name=IPAMincho,style=plain,size=50]
     Ascent:  43.99414
     Descent: 6.0058594

java.awt.Font[family=IPAMincho,name=IPAMincho,style=bold,size=50]
     Ascent:  45.60547
     Descent: 4.3945312
----------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: JavaApplication1.java
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20140203/8ea5d7f2/JavaApplication1.java>


More information about the 2d-dev mailing list