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

QTextOdfWriter uses default font that doesn't exist on all platforms

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.5.7, 6.8.1
    • GUI: Text handling
    • None
    • macOS

    Description

      https://github.com/qt/qtbase/blob/v6.8.1/src/gui/text/qtextodfwriter.cpp#L674 is:

      writer.writeAttribute(foNS, QString::fromLatin1("font-family"), QString::fromLatin1("Sans")); // Qt default
      

       

      If this line is triggered on macOS, then we could see a debug log like this:

      qt.qpa.fonts: Populating font family aliases took 159 ms. Replace uses of missing font family "Sans" with one that exists to avoid this cost.
      

       

      Suggestion
      Follow QTBUG-123416 and replace "Sans" with "Arial", or use a default font option from the platform theme plugin.

      Attachments

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              skoh-qt Sze Howe Koh
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes