artificial emboldening of bold fails for some char

2019-09-12 05:36发布

Currently, using the below sample code,

Rectangle {
    property string myText: "The 0137iT quick brown fox jumps over the lazy 
                             dog."

    width: 320; height: 480
    color: "steelblue"

    FontLoader { id: localFont; source: "/usr/share/fonts/ttf/NotoSansCJK.ttc" }

    Column {
        anchors { fill: parent; leftMargin: 10; rightMargin: 10; topMargin: 10 }
        spacing: 15

        Text {
            text: myText
            color: "lightsteelblue"
            width: parent.width
            wrapMode: Text.WordWrap
            font { family: localFont.name; pixelSize: 20; bold: 
                   false;capitalization: Font.Capitalize }
        }

        Text {
            text: myText
            color: "lightsteelblue"
            width: parent.width
            wrapMode: Text.WordWrap
            font { family: localFont.name; pixelSize: 20; bold: 
                   true;capitalization: Font.Capitalize }
        }

    }
}

Download the font (NotoSansCJK.ttc) from the below link,

https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJK.ttc.zip

Test_Output_Snap_Shot

Issue is that when tried to bold the text, "i" is not getting bold as seen in the attached snap shot.

标签: qt fonts qml
1条回答
做个烂人
2楼-- · 2019-09-12 05:58

Freetype what I am using is old one with latest freetype issue was resolved .

查看更多
登录 后发表回答