About OTF font rendering via QtQuick control2



  • 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.



    • 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"
        }
    }


  • @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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.