Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Unsolved About OTF font rendering via QtQuick control2

    QML and Qt Quick
    2
    3
    1401
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Mintogo last edited by

      Hello

      I have question about OTF font.

      When I apply Google's Noto Sans CJK Font(OTF), QML didn't rendered it clearly.

      Is there any way to resolve it?

      I will add some screen shot tommorow.

      1 Reply Last reply Reply Quote 0
      • jpnurmi
        jpnurmi last edited by

        • Which exact Noto Sans CJK variant?

        • Which exact Qt version are you using?

        • How did you set the font?

        • Have you tried with plain Qt Quick without Qt Quick Controls 2?

        • Can you reproduce it with this kind of minimal test case?

          import QtQuick 2.9
          import QtQuick.Window 2.2

          Window {
          width: 300
          height: 300
          visible: true

            Text {
                text: "<text>"
                font.family: fontLoader.name
            }
          
            FontLoader {
                id: fontLoader
                source: "path/to/NotoSansCJK<foo>.otf"
            }
          

          }

        1 Reply Last reply Reply Quote 2
        • M
          Mintogo last edited by

          @jpnurmi said in About OTF font rendering via QtQuick control2:

          Which exact Noto Sans CJK variant?
          Which exact Qt version are you using?
          How did you set the font?
          Have you tried with plain Qt Quick without Qt Quick Controls 2?
          Can you reproduce it with this kind of minimal test case?

          Hello! sorry I checked it so lately..

          1. I applied Noto Sans CJKKr Regular font.(It's for Korean).
          2. I using Qt 5.7.1, now.
          3. I tried two way
            3-1. Install font in Windows system and set font family in Text component(ex> font.family: "Noto Sans").
            3-2. Added it internal resource, Add FontLoader component and use fontLoader.name
          4. Nope, I didn't. Because Our program's all UI is based on QML.
          5. yeap,, I tried.

          Here is some screen shot.

          1. Font family is Arial and Text rendering type is Native Rendering
            https://imgur.com/OvynvTE

          2. Font family is Arial and Text rendering type is Default Rendering
            https://imgur.com/NQzPOkl

          3. Font family is Noto Sans and Text Rendering type is Native Rendering
            https://imgur.com/3YR4A7m

          4. Font family is Noto Sans and Text Rendering type is Default Rendering
            https://imgur.com/JOH7nI9

          as you can see, Noto Sans and Native Rendering looks break.

          When I use Arial font, because of some times texts are breaken, I use native rendering.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post