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

EUDC (End User Defined Characters) are not displayed on Windows with Java 8u60+

    Details

    • Subcomponent:
      2d
    • Introduced In Version:
    • Resolved In Build:
      b100
    • CPU:
      x86_64
    • OS:
      windows_7

      Backports

        Description

        FULL PRODUCT VERSION :
        java version "1.8.0_60"
        Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
        Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Windows 7 32/64, Windows 8 32/64 Window 8.1 32/64 windows 10 32/64

        EXTRA RELEVANT SYSTEM CONFIGURATION :
        DBCS(Japanese, Chinese, Korea and others) Windows

        A DESCRIPTION OF THE PROBLEM :
        Oracle Java 8.0 does not display EUDC (End User Defined Characters a.k.a UDC or Gaiji.)
        In case of Oracle 7.0, IBM 7.0 and IBM 8.0, we can see system UDCs registered with Windows.

        This page states as "On Windows, if there is a system EUDC (End User Defined Characters) font registered with Windows, the runtime automatically adds this font as well as a fallback font for 2D rendering."
        So , Oracle Java 8.0 also should display EUDC on Windows like Oracle 7.0 and others.

        http://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html



        REGRESSION. Last worked in version 8u60

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        This is a test class , Java2D_UDC.

        In this, EUDC u+E000, u+E001and u+E002 are used for test and should be displayed if you resister them as your Windows EUDC.
        Oracle 7.0 displays them. But Oracle 8.0 does not . Instead, it displays squares for each.

        -------------------------------------------
        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);
          }
        }


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Oracle 8.0 should display EUDCs on Windows like as Oracle 7.0, IBM Java 7.0 and IBM Java 8.0 .
        ACTUAL -
        Oracle 8.0 does not display EUDCs on Windows.
        Instead, it displays squares for each.

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        1) Resister EUDCs to u+E000, u+E001and u+E002 on WIndows.
        2) Run this as '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 ----------

        CUSTOMER SUBMITTED WORKAROUND :
        Use Oracle 7.0 or IBM Java 7.0 / 8.0

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: