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

Wrong font loading

    XMLWordPrintable

    Details

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

      Windows Vista Russian

      Description

      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.

        Attachments

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

          Issue Links

            Activity

              People

              Assignee:
              prr Philip Race
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: