Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5082755

Java2D text: Some > 400 pt algorithmically bolded glyphs are incorrect.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 6
    • client-libs
    • None
    • 2d
    • mustang
    • generic
    • generic

      On JDK 1.4.X (and also JDK 1.5) some very large glyphs that are algorithmically
      bolded display incorrectly - the paths that are generated by T2K are apparently
      incorrect. The same happens whether the JDK obtains a bitmap from T2K and
      blits that, or obtains a shape and fills that, so the problem appears to be
      in T2K.
      It has been claimed this problem starts to show up with pt sizes > 400

      here's a test case that shows the problem on Solaris 9 at 600 pt but not 599pt
      import java.awt.*;

      public class BigCJK extends Component {

         private Image image;
         private Graphics graphics;

         public Dimension getPreferredSize() {
            return(new Dimension(1200,800));
         }

         public void paint(Graphics theGraphics) {

            if (image == null) {
               image = createImage(getSize().width, getSize().width);
            }
            graphics = image.getGraphics();
            graphics.setColor(Color.white);
            graphics.fillRect(0,0,getSize().width, getSize().width);
            //Font f = new Font("FZFangSongTi", Font.BOLD, 599);
            Font f = new Font("FZFangSongTi", Font.BOLD, 600);
            graphics.setFont(f);
            graphics.setColor(Color.black);
            graphics.drawString("\u3401", 500, 500);
            theGraphics.drawImage(image,0,0,this);
         }

         public static void main(String [] args) {
            Frame f = new Frame();
            BigCJK cjk = new BigCJK();
            f.add(cjk,BorderLayout.CENTER);
            f.pack();
            f.setVisible(true);
         }

            igor Igor Nekrestyanov (Inactive)
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: