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

Create a mechanism for selecting fonts based on language

    XMLWordPrintable

Details

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

    Description

      We currently select fonts and fallbacks based on the writing system of the text and the ranges that indicate support in the OS/2 table of the font.

      This has the limitation that characters such as Hanzi will be detected as Chinese, whereas it can also be Japanese characters (kanji), since they share the Unicode range. In the latter case, you may want a slightly different appearance for the glyphs.

      The same issue (the need for regional variants on the same logical characters) exists for Farsi and for some languages that use Cyrillic characters.

      The typical way of solving this in HTML is by the language property, and the font engines (such as FontConfig) often support preferring fonts based on language and not just writing system support. In addition, the shaping rules in the font may be language-specific (so the font may support local variants by special OpenType rules).

      In Qt, we currently do not enable any of this, since there is no way to indicate to the system what the language of the input string is.

      We should add an additional property to QFont for this, and this can also be mapped to QTextFormat and again to the HTML parser.

      The level of support would of course depend on the font database and shaper in use.

      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