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

EUDC character is not displayed on Swing

    Details

    • Subcomponent:
      2d
    • Introduced In Build:
      b74
    • Introduced In Version:
      7
    • Resolved In Build:
      b128
    • CPU:
      x86
    • OS:
      windows_7
    • Verification:
      Verified

      Description

      OPERATING SYSTEM
      ----------------
      Windows 7 Professional x86 (Japanese)
      Windows Server 2008 Enterprise x64 SP2 (Japanese)

      FULL JDK VERSION
      ----------------
      java version "1.7.0-ea"
      Java(TM) SE Runtime Environment (build 1.7.0-ea-b87)
      Java HotSpot(TM) 64-Bit Server VM (build 18.0-b01, mixed mode)

      DESCRIPTION
      -----------
      I tried to type EUDC (End User Defined Character) into JTextArea.
      Square character was displayed even if IME candidate window had this character

      REPRODUCTION INSTRUCTIONS
      -------------------------

      1. run "eudcedit", create font glyph into 0xF040 (U+E000), save it.
         (Save it into EUDC file)
      2. Compile and run attached testcase:
           > javac JTextAreaTest2.java
           > java JTextAreaTest2 1
      2. Turn on MS-IME
      3. Type "e000" and press F5 key
      4. Candidate window has EUDC character, select it
      5. Square character is displayed

      TESTCASE SOURCE
      ---------------
      =======================================
      import javax.swing.*;
      import java.awt.*;

      class JTextAreaTest2 extends JFrame {
        JTextAreaTest2(String title) {
          super(title);
          Container c = getContentPane();
          c.setLayout(new GridLayout(1,0));
          c.add(new JTextArea());
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setSize(300, 200);
          setLocationByPlatform(true);
          setVisible(true);
        }
        public static void main(String[] args) {
          for(String title : args)
            new JTextAreaTest2(title);
        }
      }
      =======================================

      SUGGESTED FIX
      -------------
      ===================================================================
      Index: windows/classes/sun/awt/Win32FontManager.java
      ===================================================================
      --- windows/classes/sun/awt/Win32FontManager.java (revision 332)
      +++ windows/classes/sun/awt/Win32FontManager.java (working copy)
      @@ -285,6 +285,10 @@
                });
           }

      + public TrueTypeFont getEUDCFont() {
      + return eudcFont;
      + }
      +
           protected static native void registerFontWithPlatform(String fontName);

           protected static native void deRegisterFontWithPlatform(String fontName);
      ===================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                prr Philip Race
                Reporter:
                dkorbel David Korbel (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: