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

[macos] Japanese fall back glyphs for Serif font have greater ascent than Times

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • tbd
    • 11, 14
    • client-libs
    • 2d
    • x86_64
    • os_x

      FULL PRODUCT VERSION :
      openjdk version "14-ea" 2020-03-17
      OpenJDK Runtime Environment (build 14-ea+23-1048)
      OpenJDK 64-Bit Server VM (build 14-ea+23-1048, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Mac OS X

      A DESCRIPTION OF THE PROBLEM :
      With Japanese Mac OS X, Japanese characters with Serif font
      are displayed too upper position. A few dots are over JTextField's area.

      "Hiragino Mincho ProN W3" seems to be used.

      Other logical fonts don't have the problem.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile and launch the sample code with Japanese fonts

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Expected:
      All glyphs can be fit in the JTextField area.
      Actual:
      A few dots of top of Japanese characters are out of the JTextField area.

      REPRODUCIBILITY :
      This bug can be reproduced always.

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

      public class JTFieldTest {
          public static void main(String[] args) {
              JFrame f = new JFrame();
              JTextField t = new JTextField("TTT\u4e9c\u5516\u5a03\u963f\u54c0\u611b\u6328\u59f6\u9022\u8475\u831c\u7a50");
              t.setFont(new Font(Font.SERIF, Font.PLAIN, 29));
              f.add(t);
              f.pack();
              f.setVisible(true);
          }
      }
      ---------- END SOURCE ---------- 

            prr Philip Race
            tnakamura Toshio Nakamura
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: