support for both English and native font names

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 8
    • Component/s: javafx
    • None
    • Environment:

      Windows7 Chinese. Microsoft Office is installed, so there are some addition native fonts.

      Most of CCJK fonts have English and native font names. Prism only supports font names in list from com.sun.javafx.font.PrismFontFactory.getFontFactory().getFontFamilyNames()

      Usually above method return all English font names, but in some cases, the list has native font names. When setting font by :
      font = Font.font(fontName, size); or font = new Font(fontName, size);
      fontName here must be in the list of com.sun.javafx.font.PrismFontFactory.getFontFactory().getFontFamilyNames() , otherwise, it fallbacks to "System" font.

      For example:
      SimHei font has English name "SimHei" and Chinese name "黑体". If PrismFontFactory.getFontFactory().getFontFamilyNames() returns "黑体", we can only use
      font = Font.font("黑体", size);

      but
      font = Font.font("SimHei", size);
      doesn't work, and vice versa.

      Howerver, jdk awt font supports both English and native font names, in above example, both
      font = Font.font("黑体", size);
      and
      font = Font.font("SimHei", size);
      can set font correctly.

            Assignee:
            Unassigned
            Reporter:
            Jenny Huang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Imported: