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

Windows: Font with empty name string not handled.

XMLWordPrintable

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

      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.

        1. font-test.pro
          0.3 kB
          Michael Bruning
        2. main.cpp
          0.5 kB
          Michael Bruning
        3. testfont.ttf
          94 kB
          Michael Bruning
        4. UBraille.ttf
          151 kB
          Konstantin Ritt
        5. qfontcombobox.png
          8 kB
          Konstantin Ritt
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            esabraha Eskil Abrahamsen Blomfeldt
            mibrunin Michael Bruning
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes