qt 5.2.1中某些字符的粗体人工刺绣失败 [英] artificial emboldening of bold fails for some characters in qt 5.2.1
本文介绍了qt 5.2.1中某些字符的粗体人工刺绣失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
目前,使用下面的示例代码,
矩形{
属性字符串myText:0137iT quick brown狐狸跳过懒惰的
狗。
width:320;身高:480
颜色:steelblue
FontLoader {id:localFont;来源:/usr/share/fonts/ttf/NotoSansCJK.ttc}
列{
anchors {fill:parent; leftMargin:10; rightMargin:10; topMargin:10}
spacing:15
文本{
text:myText
color:lightsteelblue
width:parent.width
wrapMode:Text.WordWrap
font {family:localFont.name; pixelSize:20; bold:
false;大写:Font.Capitalize}
}
文本{
text:myText
color:lightsteelblue
width :parent.width
wrapMode:Text.WordWrap
font {family:localFont.name; pixelSize:20; bold:
true; capitalization:Font.Capitalize}
}
$ b}
}
从下面的链接下载字体(NotoSansCJK.ttc),
https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJK.ttc.zip
问题是,当试图加粗文本时, i 没有像附加的快照那样变得粗体。
解决方案
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
Issue is that when tried to bold the text, "i" is not getting bold as seen in the attached snap shot.
解决方案
Freetype what I am using is old one with latest freetype issue was resolved .
这篇关于qt 5.2.1中某些字符的粗体人工刺绣失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文