Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-81988 Issues with fallbacks selection based on QChar::Script
  3. QTBUG-81992

Create an opt-in feature to optimize fallback assignment

    XMLWordPrintable

Details

    • Technical task
    • Resolution: Unresolved
    • P2: Important
    • None
    • GUI: Font handling
    • None
    • All

    Description

      The fallback / font-merging mechanism (assigning fonts to characters when the main font is not applicable) may end up with different fonts for the characters of the string, even if there exists a single font which can show them all. One typical example would be Japanese text, where you can easily get a Chinese font for the Kanji characters, and a different, Japanese font for the Hiragana/Katakana characters.

      The reason is that we only go through the string character by character and assign fonts disregarding context.

      A better way would be to check all fonts against all characters and keep the data from this. Then we apply the font which supports the most characters to these characters first. When this is done, we check which font supports the most of the remaining characters and apply this to them. Etc. until the whole string is covered.

      This should be an opt-in feature, since it will likely cause a slow-down on systems with a lot of fonts (the fact that the first font in the list is usually sufficient is likely a pretty significant optimization). But it is worth checking if it is fast enough to be useful in cases where you get the wrong appearance by default.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            esabraha Eskil Abrahamsen Blomfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes