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

[macosx] Font ligatures are not rendered for natively loaded font

    XMLWordPrintable

    Details

    • Subcomponent:
      2d

      Description

      Optional font ligatures are not rendered when natively loaded font is used.
      When the same font is loaded in application using java.awt.Font.createFont() method, it works fine.

      The behaviour is strictly reproducible on Mac OSX.
      It works as expected on Windows operating systems.


      Steps to reproduce
      ------------------
      1. Install “Hasklig” font (Hasklig-Regular.noDFLT.otf)
          (make sure that the file becomes available in ~/Library/Fonts folder),
      2. In a small Swing app, add JLabel with "->" as text.
      3. Enable ligatures on the font.
      4. Actual behaviour:
          Compile Ligatures1Test.java and run it.
          The window shows characters that are rendered separately.
      4. The expected behaviour:
          Compile Ligatures2Test.java and run it.
          The window shows characters that are rendered as a single glyph.


      Workaround
      ----------
      Application to use java.awt.Font.createFont() method,
      Loading font from non-standard directory.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                aivanov Alexey Ivanov
                Reporter:
                shadowbug Shadow Bug
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: