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

display INVISIBLE_GLYPH_ID as square box on Windows

XMLWordPrintable

    • x86_64
    • windows_7

      ADDITIONAL SYSTEM INFORMATION :
      Windows7 SP1 64bit

      A DESCRIPTION OF THE PROBLEM :
      JavaFX displays INVISIBLE_GLYPH_ID as square box on Windows.

      Even on the same Windows ver, whether reproduce or not depends on environments.
      In my environments, It reproduced with Widows7 SP1 64bit and not reproduced with Windows 10.
      This does not mean that Win7 always reproduces and Win10 does not.
      I do not know what kind of environment is affecting to reproduce.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Please run following INVISIBLE_GLYPH_IDTest.java

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      https://drive.google.com/open?id=1ePuL3VtRMHP0tx3NKn0v9UkxTONHk8ET
      ACTUAL -
      https://drive.google.com/open?id=1XSV6vIdLRgibqu4mHzOqdEc6qAXck7Hz

      ---------- BEGIN SOURCE ----------
      import javafx.application.Application;
      import static javafx.application.Application.launch;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.layout.VBox;
      import javafx.scene.text.Font;
      import javafx.scene.text.Text;
      import javafx.stage.Stage;

      public class INVISIBLE_GLYPH_IDTest extends Application {

          private static String OS = System.getProperty("os.name").toLowerCase();

          public void start(Stage stage) {
              if (OS.indexOf("win") < 0) {
                  System.err.println("# You need to run on Windows");
                  System.exit(0);
              }

              final String fontName = "ipaexm.ttf";
              // download from https://ipafont.ipa.go.jp/node26#en
              // and place in {user.home}/fonts/

              final String base = System.getProperty("user.home")+"/fonts/";
              Font font = Font.loadFont("file://"+base+fontName, 48);
              if (font == null || !"IPAexMincho".equals(font.getName())) {
                  System.err.println("# You need to place "+fontName+" in "+base);
                  System.exit(0);
              }

              stage.setWidth(120);
              stage.setHeight(80);
              Group g = new Group();
              final Scene scene = new Scene(new Group());
              VBox box = new VBox();
              ((Group)scene.getRoot()).getChildren().add(box);
              stage.setScene(scene);

              Text txt = new Text("\ud869\ude1a"); // U+2A61A (surrogate pair)
              txt.setFont(font);
              box.getChildren().add(txt);

              stage.show();
          }
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


        1. glyph_Screenshot_win7.png
          glyph_Screenshot_win7.png
          36 kB
        2. Good.png
          Good.png
          2 kB
        3. INVISIBLE_GLYPH_IDTest.java
          2 kB
        4. NoGood.png
          NoGood.png
          2 kB

            prr Philip Race
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: