Wrong font loading

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • fx2.0
    • Affects Version/s: fx2.0
    • Component/s: javafx
    • Environment:

      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

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

              Created:
              Updated:
              Resolved:
              Imported: