Priority: Not Evaluated
Affects Version/s: 5.7
Fix Version/s: None
Component/s: GUI: Font handling
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
Line 1 should render at 12px, line 2 at 48px and line 3 at 12px.
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.