Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.8.6
-
None
-
Windows 7
-
7e721d2
Description
I have modified the Harfbuzz code in my Qt 4.8 build to support the OpenType CALT feature. This works perfectly fine for rendering. However, printing to a physical printer (via QWin32PrintEngine) will ignore the CALT feature and will print the single character instead.
I tracked the problem down to the QWin32PrintEngine::drawTextItem() method. When using a CALT enabled text snippet this method still converts the glyphs to ASCII text, which breaks the OpenType glyphs. Hard coding the "convertToText" variable to "false" in this method results in a correct printing.
As comparison, when using a text snippet which uses the OpenType LIGA features (supported by default in Qt 4.8) the "convertToText" variable gets set to false, which results in a correct print results.
Thus I have two questions:
a) Why does QWin32PrintEngine try to convert the text to ASCII before printing instead of always passing the original glyph data to the printer?
b) Would patching the drawTextItem() method in my code base to always disable the ASCII text conversion cause any problems? Are there situations where the text needs to be converted to ASCII to get it printed correctly?
Thanks in advance for your help!
Greetings,
Fabian