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

Incorrect glyphs printed from OpenType PS font when printing on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • 4.6.2, 4.6.3, 4.7.0
    • None

    Description

      When printing on Windows, drawing any text containing characters that have unicode point greater than 0x80 with an OpenType PS font (ie. OpenType with Type 1 outlines) results in the incorrect glyphs being drawn.

      This is closely related to QTBUG-11387 and QTBUG-10089. The underlying cause of all these problems is the use of the "ttf" flag in QFontEngineWin to determine whether a cmap table should be used, whereas in fact the cmap should also be used for OpenType PS fonts. The fix is to use the "cmap" flag in draw_text_item_win in QPrintEngine_win.cpp instead of the "ttf" flag, when determining whether to pass ETO_GLYPH_INDEX to the Win32 ExtTextOut API.

      I've attached a test case to exhibit the bug. First install the supplied font Opus.otf from within the zip. Observe that the notehead drawn in the window becomes a '4' when printed. I've also attached a simple patch against 4.7 beta 2 that fixes this bug.

      Attachments

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              jlarcombe James Larcombe
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes