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

Java "1.8.0_112" on Windows 10 displays different characters for EUDCs from ones created in eudcedit.exe.

    Details

    • Subcomponent:
      2d
    • Introduced In Version:
    • Resolved In Build:
      b158
    • CPU:
      generic
    • OS:
      windows_10

      Backports

        Description

        FULL PRODUCT VERSION :
        java version "1.8.0_112" both of 32 bit and 64bit have this defect.

        java version "1.8.0_112"
        Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
        Java HotSpot(TM) Client VM (build 25.112-b15, mixed mode, sharing)

        java version "1.8.0_112"
        Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
        Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [Version 10.0.14393]

        EXTRA RELEVANT SYSTEM CONFIGURATION :
         Windows 10 Japanese.

        A DESCRIPTION OF THE PROBLEM :
        Java "1.8.0_111" on WIndows 10 displays EUDCs as resisted.
        But Java "1.8.0_112" on WIndows 10 displays different characters for EUDCs instead of resisted ones.

        REGRESSION. Last worked in version 8u111

        ADDITIONAL REGRESSION INFORMATION:
        java version "1.8.0_111" both of 32 bit and 64bit works as expecting.

        java version "1.8.0_111"
        Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
        Java HotSpot(TM) Client VM (build 25.111-b14, mixed mode, sharing)

        java version "1.8.0_111"
        Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
        Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)


        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        On Windows 10, run "eudcedit", create font glyph EUDC u+E000, u+E001 and u+E002
        and save it.

        Compile and run attached testcase:
             > javac Java2D_UDC.java
             > java Java2D_UDC
        ------------------------------------------
        import java.awt.*;
        import javax.swing.*;

        public class Java2D_UDC extends JPanel{

          public static void main(String[] args){

            JFrame frame = new JFrame();

            Java2D_UDC comp = new Java2D_UDC();
            frame.getContentPane().add(comp);

            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setBounds(0, 0, 400, 60);
            frame.setTitle("Font Test");
            frame.setVisible(true);
          }

          public void paintComponent(Graphics g){
            Graphics2D g2d = (Graphics2D)g;
          
           Font font = new Font(Font.MONOSPACED, Font.PLAIN, 16);
                g2d.setFont(font);
          
        String testStr="UDC:\uE000\uE001\uE002";
        g2d.drawString(testStr , 5, 20);
          }
        }

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


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        EUDC u+E000, u+E001 and u+E002 are shown as registered ones by eudcedit.exe.
        java version "1.8.0_111" can do it.
        ACTUAL -
        EUDC u+E000, u+E001 and u+E002 are shown as different characters from registered ones by eudcedit.exe.


        REPRODUCIBILITY :
        This bug can be reproduced always.

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

        public class Java2D_UDC extends JPanel{

          public static void main(String[] args){

            JFrame frame = new JFrame();

            Java2D_UDC comp = new Java2D_UDC();
            frame.getContentPane().add(comp);

            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setBounds(0, 0, 400, 60);
            frame.setTitle("Font Test");
            frame.setVisible(true);
          }

          public void paintComponent(Graphics g){
            Graphics2D g2d = (Graphics2D)g;
          
           Font font = new Font(Font.MONOSPACED, Font.PLAIN, 16);
                g2d.setFont(font);
          
        String testStr="UDC:\uE000\uE001\uE002";
        g2d.drawString(testStr , 5, 20);
          }
        }

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

        CUSTOMER SUBMITTED WORKAROUND :
        Use java version "1.8.0_111" or below.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  prr Philip Race
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Due:
                    Created:
                    Updated:
                    Resolved: