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

The glyph list in QFontSubset is incomplete, resulting in some glyphs getting the wrong names in exported EPS files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Done
    • Affects Version/s: 4.7.4
    • Fix Version/s: 5.0.0
    • Component/s: GUI: Text handling
    • Labels:
      None
    • Commits:
      dd68e93de7eb1c50cc5b5779497e03f491c90373

      Description

      The glyph list at the top of QFontSubset.cpp is incomplete - it doesn't include 'trademark' for one example, so any text including that glyph in an embedded font will not be exported correctly. The glyph will be named 'uni2122' instead, which means that it won't display correctly in Adobe Illustrator.

      The correct list to use for embedded fonts is here:
      http://www.adobe.com/devnet-archive/opentype/archives/aglfn.txt

      I noticed some other oddities about the list in QFontSubset too. The glyph name 'space' appears twice, and there are entries at the end of 'unicode_to_aglindex' which seem to refer to parts of the glyph list that don't actually exist in the 'agl' array. The last entry in 'agl' is 'upsilondieresis', which is codepoint 0x03CB, but there are a further 8 entries in 'unicode_to_aglindex' after this point which as far as I can tell will run over the end of the the 'agl' array if used at runtime, causing a crash or data corruption.

      Once the full glyph list is included, it would be better if QFontSubset::glyphName used a binary rather than a linear search as this will start getting quite inefficient with more glyphs.

      I knocked up a quick Python script to make the correct glyph arrays for QFontSubset from the Adobe master - attached.

      (See also QTBUG-12727, which may need patching before you can reproduce this one.)

        Attachments

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

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jlarcombe James Larcombe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes