Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-53652

Color fonts scale incorrectly after caching

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.7
    • GUI: Font handling
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            elleo Michael Sheldon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes