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

Windows: Font with empty name string not handled.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 5.3.0 Alpha, 5.3.0 Beta1
    • GUI: Font handling
    • None
    • Windows 8

    Description

      This was uncovered while debugging QTBUG-38356 .

      The attached font contains valid font data and is processed correctly on Linux, but is rejected on Windows because it's name string is empty and returning an empty string from EmbeddedFont::changeFamilyName in qtbase/src/plugins/platforms/windows/qwindowsfontdatabase.cpp is used to indicate that the change of the family name failed.

      The files attached are a minimal example that tries to load the attached font (which is rejected) using QRawFont and then tries to load the arial.ttf font that is installed on windows in c:\windows\fonts\. The testfont.ttf file needs to be in the same folder as the executable.

      Attachments

        1. font-test.pro
          0.3 kB
        2. main.cpp
          0.5 kB
        3. qfontcombobox.png
          qfontcombobox.png
          8 kB
        4. testfont.ttf
          94 kB
        5. UBraille.ttf
          151 kB

        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
              mibrunin Michael Bruning
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes