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

QML FontLoader does not work if the absolute path to the font contains non-latin characters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0 RC
    • 5.3.2
    • None
    • Linux pc 3.17.1-1-ARCH #1 SMP PREEMPT Wed Oct 15 15:04:35 CEST 2014 x86_64 GNU/Linux
    •  824f01af8ffb39d94807c2b27d1259b9206b3014

    Description

      If the absolute path contains non-latin characters, QML FontLoader font is loaded, but can not be used for text rendering.

      The status property is changed to FontLoader.Ready, the name property is correctly populated, but text rendering fails and is done using a fallback font.

      A non-latin path, containing a qml and a ttf, where qml loads the ttf using a relative path: (source: 'myfont.ttf') also results in broken font loading.

      Loading remote fonts urls works fine, even from non-latin urls, because the fonts are loaded in memory and the absolute path becomes something like ":qmemoryfonts/0".

      A possible fix would be to load all fonts to memory, or to fix the non-utf paths somewhere.

      I attached FC_DEBUG=4 logs.

      Also I attached two test qml files (which could be alternatively downloaded from http://oserv.org/bugs/qml/fonts/), the font used is http://www.paratype.ru/uni/public/PTSans.zip
      When those two qml files are placed in a non-latin path, font_remote.qml works fine while font_local.qml fails to use the font.

      Attachments

        1. fc_debug.local.txt
          227 kB
          Сковорода Никита
        2. fc_debug.remote.txt
          229 kB
          Сковорода Никита
        3. font_local.qml
          0.3 kB
          Сковорода Никита
        4. font_remote.qml
          0.4 kB
          Сковорода Никита
        5. QTBUG-42249.tgz
          223 kB
          Shawn Rutledge
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            chalker Сковорода Никита
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes