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

Java "1.8.0_112" on WIndows 10 displays different glyph for EUDC from ones registered by eudcedit.exe.

    XMLWordPrintable

    Details

    • Subcomponent:
      2d
    • CPU:
      generic
    • OS:
      windows_10

      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 :
      Windows 10 32bit/64bit
      Microsoft Windows [Version 10.0.14393]

      A DESCRIPTION OF THE PROBLEM :
      The symptom itself is duplicate of JDK-8170913. But I have found the cause, so I am submitting this.

      Java "1.8.0_112" on WIndows 10 displays different glyph for EUDC from ones registered by eudcedit.exe.
      Instead of registered glyph, ones from 'Segoe UI Symbol' are displayed.

      On 1.8.0_112, Segoe UI Symbol has been added as a fallback font in the fontconfig as following from 8u111.
      -------------------------------------------------
      allfonts.symbols=Segoe UI Symbol

      sequence.fallback=lucida,symbols,\ <==== "symbols," has been added here.
                        chinese-ms950,chinese-hkscs,chinese-ms936,chinese-gb18030,\

      filename.Segoe_UI_Symbol=SEGUISYM.TTF
      ------------------------------------------------

      'Segoe UI Symbol' has glyph in the EUDC area (from U+E000) .
      So instead using registered ones by users, ones from Segoe UI Symbol are displayed.

      'Segoe UI Symbol' should not be included in the fallback font list or EUDC font should have higher priority than 'Segoe UI Symbol'.


      REGRESSION. Last worked in version 8u111

      ADDITIONAL REGRESSION INFORMATION:
      This is difference fontconfig between 8u112 and 8u111

      C:\>fc C:\jdk_112_64\jre\lib\fontconfig.properties.src C:\jdk_111_64\jre\lib\fontconfig.properties.src
      Comparing files C:\JDK_112_64\JRE\LIB\fontconfig.properties.src and C:\JDK_111_64\JRE\LIB\FONTCONFIG.PROPERTIES.SRC
      ***** C:\JDK_112_64\JRE\LIB\fontconfig.properties.src
      allfonts.symbol=Symbol
      allfonts.symbols=Segoe UI Symbol
      allfonts.thai=Lucida Sans Regular
      ***** C:\JDK_111_64\JRE\LIB\FONTCONFIG.PROPERTIES.SRC
      allfonts.symbol=Symbol
      allfonts.thai=Lucida Sans Regular
      *****

      ***** C:\JDK_112_64\JRE\LIB\fontconfig.properties.src

      sequence.fallback=lucida,symbols,\
                        chinese-ms950,chinese-hkscs,chinese-ms936,chinese-gb18030,\
      ***** C:\JDK_111_64\JRE\LIB\FONTCONFIG.PROPERTIES.SRC

      sequence.fallback=lucida,\
                        chinese-ms950,chinese-hkscs,chinese-ms936,chinese-gb18030,\
      *****

      ***** C:\JDK_112_64\JRE\LIB\fontconfig.properties.src
      filename.Segoe_UI_Symbol=SEGUISYM.TTF
      ***** C:\JDK_111_64\JRE\LIB\FONTCONFIG.PROPERTIES.SRC
      *****


      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 this 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 of registered ones by eudcedit.exe should be displayed.
      java version "1.8.0_111" can do it.
      ACTUAL -
      u+E000, u+E001 and u+E002 from Segoe_UI_Symbol are displayed.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      On Windows 10, run "eudcedit", create font glyph EUDC u+E000, u+E001 and u+E002
      and save it.

      Compile and run this 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 ----------
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Copy fontconfig.properties.src to fontconfig.properties

      Edit fontconfig.properties and remove 'symbols,' from sequence.fallback line and save it.

      [Before]
      sequence.fallback=lucida,symbols,\

      [After]
      sequence.fallback=lucida,\

      Run your Java program.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aroy Abhijit Roy (Inactive)
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: