Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. About OTF font rendering via QtQuick control2
Forum Updated to NodeBB v4.3 + New Features

About OTF font rendering via QtQuick control2

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 1.9k Views 1 Watching
  • 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 Offline
    M Offline
    Mintogo
    wrote on last edited by
    #1

    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
    0
    • jpnurmiJ Offline
      jpnurmiJ Offline
      jpnurmi
      wrote on last edited by
      #2
      • 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
      2
      • M Offline
        M Offline
        Mintogo
        wrote on last edited by
        #3

        @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
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved