Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
None
-
5.7
-
None
-
Ubuntu 16.04
Description
Steps to reproduce:
1. Render a piece of text at pixel size 12 containing some emoji characters using a color font (e.g. Emoji One)
2. Render a second piece of text at pixel size 48, containing emoji characters not used in the previous line
3. Render a third piece of text containing more unique emoji at pixel size 12
Expected result:
Line 1 should render at 12px, line 2 at 48px and line 3 at 12px.
Actual result:
Line 1 renderers at 12px and line 2 at 48px, however line 3 also renders at 48px instead of 12px.
This happens as a result of the scalableBitmapFactor being shared between QFontEngineFT instances and only updated when an engine is initialised for the first time. Because a 12px version of the engine has already been cached from rendering line 1 it doesn't get reinitialised for line 3 and so keeps using the scalableBitmapFactor from line 2 (48px).
The attached patch associates the scalableBitmapFactor with the QFontEngineFT so that it's preserved when restoring from the cache.
Attachments
For Gerrit Dashboard: QTBUG-53652 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
161161,5 | Preserve the scale of fonts when caching the font engine | 5.7 | qt/qtbase | Status: MERGED | +2 | 0 |