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
- is required for
-
QTBUG-25378 QtPrintSupport - Font Issues
- Open
-
QTBUG-25384 QtPrintSupport - Windows issues
- Open