United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6961732 FontMetrics.getLeading() may be negative in freetype-based OpenJDK builds
JDK-6961732 : FontMetrics.getLeading() may be negative in freetype-based OpenJDK builds

Details
Type:
Bug
Submit Date:
2010-06-16
Status:
Closed
Updated Date:
2012-08-03
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
client-libs
OS:
generic
Sub-Component:
2d
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7,8
Fixed Versions:

Related Reports
Backport:
Duplicate:

Sub Tasks

Description
A small test program showed that 12 pt Deja Vu Sans was reporting
FontMetrice.getLeading() of -1, but only in OpenJDK  freetype-based builds.

This is caused by freetype doing premature rounding of ascent,
descent and height, thus losing the raw data used to infer the leading.

For the full saga, see the March, May and June threads here:
http://mail.openjdk.java.net/pipermail/2d-dev/2010-March/001214.html
http://mail.openjdk.java.net/pipermail/2d-dev/2010-May/001242.html
http://mail.openjdk.java.net/pipermail/2d-dev/2010-June/001293.html

                                    

Comments
EVALUATION

We can apply a patch which bypasses freetype's rounding, and scale
the raw data ourselves for this point size.
                                     
2010-06-16



Hardware and Software, Engineered to Work Together