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

nls: On non-en Windows platforms, Font.getFamilies() doesn't return native fonts.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • fx2.0
    • fx2.0
    • javafx
    • None
    • Win7(or Vista) + jdk1.6.0_27 + javafx2.0b34

      Respectively run JDK GraphicsEnvironment.getAvailableFontFamilyNames() and JavaFX Font.getFamilies() , observer the result. On Windows English version, there is not much difference. However on Windows Asian versions, for JDK, all the installed fonts are listed, but for JavaFX, some fonts with native font names are not listed.

      Most of the Asian fonts have both English name and native language name, on English Windows, these fonts' name are in English, and they could be loaded correctly, but on native Windows, the font name becomes characters in native language, and it looks like JavaFX has problem on processing those fonts.

      Jdk works very well for the native fonts.

      Please find the attachment: AvailableFontsTest.java is a test program, available-fonts-ja.png is a result on JA Windows Vista. It's easy to find that JDK listed fonts with JA name, but JavaFX didn't. This also occurs on zh_CN, zh_TW and ko.

      Then using native fonts for rendering UI components is impacted. For example, on zh_CN language, the fonts which have zh_CN name are not loaded, but zh_TW, ja, ko fonts don't have zh_CN names, they are now displayed in English name and are loaded correctly. Because CCJK fonts have compatible glyphs, the zh_CN characters can be displayed, but the glyph may not be what the users want, even looks ugly, since they are from improper fonts.

            prr Philip Race
            jennyh Jenny Huang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: