Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.6.2, 5.7.0, 5.12.1
-
None
-
Mac OS X
Description
Build and run the attached app to see the problem. Drag the slider forwards and backwards to alter the stretch. Observe that the glyphs are stretched correctly, but the advances are also scaled, which is incorrect.
The problem here seems to be that the font stretch is 'baked in' to the CTFont we use to calculate the advances, yet the stretch is applied again to the advances in QTextEngine::shapeTextWithHarfbuzzNG.
Oddly the code that does this scaling is Mac-only, and there's already a conditional to suppress it for Mac OS X 10.6 - see the code specific to QFontEngine::Mac towards the end of the function. Getting rid of this scaling entirely solves the problem, but I haven't looked back to ascertain why it was added in the first place.