Different fontname on macos

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: jfx16
    • Component/s: javafx
    • None

      There are a number of ways fonts can be created on macos, and there is no consistency in naming.
      In MacFontFinder, all available fonts are retrieved as {name, family, file} blocks. For the name, the result of
      `CTFontDescriptorCopyAttribute(fd, kCTFontDisplayNameAttribute);`
      is used.

      This name acts as an identifier in a number of cases, e.g. in case of `LogicalFont.getSlotForFont(String fontName)`
      When the font is not yet loaded, it will be loaded via the constructor of `PrismFontFile` which will also interpret the file and set the different names. This is done in Java, and the retrieved value doesn't always match the original value obtained via

      `CTFontDescriptorCopyAttribute(fd, kCTFontDisplayNameAttribute);`

      As a consequence, the retrieved font is not considered the same as the requested one, and it will be put in the cache until that will overflow.

            Assignee:
            Philip Race
            Reporter:
            Johan Vos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: