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

Wrong font loading

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • fx2.0
    • fx2.0
    • javafx
    • Windows Vista Russian

      javafx.scene.text.Font can't load bold or italic font under non-english locale. How to reproduce:
      String fontName="Times New Roman";
      Font f1=Font.font(fontName, 22);
      System.out.println(f1.getName());
      Font f2=Font.font(fontName, FontWeight.BOLD,FontPosture.ITALIC,22);
      System.out.println(f2.getName());

      Output:
      Times New Roman
      SansSerif Bold Italic -- it is wrong

      Solution: change com.sun.javafx.font.PrismFontLoader. It seeks font style by english name. But fonts has non-english style names for non-english locale.

        1. example_regdump.png
          example_regdump.png
          183 kB
        2. font.gif
          font.gif
          13 kB
        3. TNR_ru.java
          0.7 kB

            prr Philip Race
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: