Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-10094

PostScript / PDF font embedding fails on Mac 64-bit due to unimplemented methods in QCoreTextFontEngine

    XMLWordPrintable

Details

    • macOS
    • 517fb9026896f7ac20376f253babae5a7c57721d qt4:323cd5198ce9d0f4f94b0cc9f3447a3318339ff7

    Description

      Font embedding in PostScript and PDF fails in the CoreText implementation on the Mac due to a number of unimplemented methods in QCoreTextFontEngine.

      1. QCoreTextFontEngine::faceId returns a dummy FaceId structure with no filename in. This is tested in QPdfBaseEnginePrivate::drawTextItem, which falls back to writing the characters as curves rather than embedding the font if no faceId could be found.

      2. QCoreTextFontEngine::getUnscaledGlyph is completely unimplemented.

      3. QCoreTextFontEngine has no override for QFontEngine::properties(), which means that embedded fonts would be given the wrong name (the base class implementation just uses the family name with style information appended, rather than calling a system API to get the real PostScript name).

      4. QCoreTextFontEngine::stringToCMap is completely unimplemented. (Note that the equivalents in QCoreTextFontEngineMulti are implemented, but glyph naming in EPS export uses the former.)

      This is related to 10089 which is a Windows-specific failure of font embedding in PS/PDF. The test case attached to that bug applies to this one too.

      Attachments

        1. coretext-fixes.diff
          3 kB
          James Turner
        2. test_54.pdf
          580 kB
          James Turner
        3. test.pdf
          11 kB
          James Turner

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              jlarcombe James Larcombe
              Votes:
              3 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes