United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6223022 '8' in 11pt Tahoma font is not rendered properly
JDK-6223022 : '8' in 11pt Tahoma font is not rendered properly

Details
Type:
Bug
Submit Date:
2005-01-28
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
client-libs
OS:
generic,windows_xp
Sub-Component:
2d
CPU:
x86,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.0,1.4.2,6
Fixed Versions:

Related Reports
Backport:
Duplicate:
Relates:
Relates:
Relates:

Sub Tasks

Description
FULL PRODUCT VERSION :
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]


A DESCRIPTION OF THE PROBLEM :
The character '8' is not rendered properly when using Tahoma plain 11 pt font (corresponds to Windows "native" font Tahoma 8).


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.awt.*;
import javax.swing.*;

public class TahomaFontTest extends JFrame
{
   public TahomaFontTest()
   {
      JTextField tf = new JTextField("88888");
      tf.setFont(new Font("Tahoma", Font.PLAIN, 11));
      getContentPane().add(tf);
      pack();
      setVisible(true);
   }
   
   public static void main(String[] args)
   {
      try
      {
         UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
      }
      catch(Exception e)
      {
         e.printStackTrace();
      }
      new TahomaFontTest();
   }
}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Use JRE 1.3.x :(
###@###.### 2005-1-28 19:09:19 GMT

                                    

Comments
EVALUATION

I have filed this separately than 4924220 which is specifically about problems
with the Microsoft Sans Serif font, whereas this is a difference in the Tahoma
font. It seems best to track this differently unless its confirmed that this
issue has the same underlying cause as some of the issues in Microsoft Sans
Serif.

The difference I see is quite small. We turn on on extra pixel - the
one identified with "+", so there is some minor asymmetry in the glyph.

 XXX
X   X
X   X
 XXX
X  +X
X   X
 XXX

###@###.### 2005-1-28 19:10:35 GMT
                                     
2005-01-28
EVALUATION

The problem is cause by using scaled outlines instead of unscaled outlines while 
processing IP hinting instruction. Being theoretically equivalent in reality they are not 
because of limitated precision of fixed point math we use. 

Difference in result of calculation is very small but in this particular case 
it has visible manifistation.

Reverting to usage of original outlines helps to resolve this issue and 
some other problems as well. In particular y from the Courier New font seems 
more clear in LCD mode.
                                     
2007-10-11
EVALUATION

Fix for this problem will also include fix for the 6320262.
                                     
2007-10-15



Hardware and Software, Engineered to Work Together