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

Install font temporarily and exclude from matching

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Won't Do
    • Affects Version/s: 5.15.2, 6.1.0
    • Fix Version/s: None
    • Component/s: GUI: Font handling
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      There are some scenarios when font installed via QFontDatabase::addApplicationFont should not be matched to.

      1. Font contains non-standard glyphs, so we should never use it unless explicitly specified.
      2. We are making Character Map replacement, in some places show all possible characters (probably using bundled fonts), and in some places show tofu when system fonts lack some character.

      In 5.14.2 AddFontResourceExW with FR_PRIVATE flag did the job (but of course it is non-portable). In 5.15+ it works extremely unreliably: works for NotoNaskhArabic-Regular.ttf and does nothing for NotoSansRunic-Regular.ttf.

      Either of three ways works for me.

      1. Make AddFontResourceExW work again like in 5.14.
      2. QFontDatabase::addApplicationFont(fileName, QFontDatabase::NoMatchTo)
      3. QFont::setStyleStrategy(QFont::NoApplicationFonts).

        Attachments

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

          Activity

            People

            Assignee:
            esabraha Eskil Abrahamsen Blomfeldt
            Reporter:
            Mercury13kiev Mikhail Merkuryev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes