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

String containing Unicode \u0700 - \u206F characters are not displayed correctly

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      03
    • CPU:
      x86
    • OS:
      windows_nt
    • Verification:
      Verified

      Backports

        Description

        String containing Unicode \u0700 - \u206F characters are not displayed correctly.

        OS: WindowsNT4.0 (Japanese), Windows98 (Japanese)
        JDK version: 1.2.2-004 - 006, 1.3, 1.3.1 and 1.3.0_01
        (There is no problem on versions earlier than 1.2.2 and the latest version 1.4.0beta-b40)
        Method: Graphics.drawString(String s) and Graphics2D.drawString(String g)

        To reproduce this bug, please compile test program below and run through appletviewer.
        This program displays two lines of strings. Upper line contains only ascii characters.
        Lower line contains Unicode \u2015 character. Both two lines will appear at first, but after
        we hide strings by another window and slide that window a little bit, the lower line will not
        be repainted.

        ===================== test.html ========================================================
         <APPLET Code=test.class Width=400 Height=400></APPLET>

        ===================== test.java ========================================================
        public class test extends Applet{
          public void paint(Graphics g){
            //Graphics2D g2d = (Graphics2D)g;
            //g2d.setFont(new Font("Dialog", Font.PLAIN, size));
            //g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g.drawString("abcdefghijeklmnopqrstuvwxyz",10,30);
            g.drawString("abcdefghijekl\u2015mnopqrstuvwxyz",10,50);
          }
        }
        =========================================================================================
        This problem also occurs with Graphics2D.drawString method.
        To reproduce this, please uncomment 3 comment lines in test.java and change variable
        name g to g2d.


          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pkejriwasunw Parry Kejriwal (Inactive)
                  Reporter:
                  duke J. Duke (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: