Text and emojies in QML
-
Hello ,
I'm running an application that displays texts with emojies on Raspberry PI and linux.
here's the output i get .Elements that could help for diagnostic : works fine on windows but not linux.
in my console i have the emojies displayed on all the platforms.
I think it's unicode problem. i tried to convert the text to hex unicode then display it in console it works fine ... i think the system can do the conversoin but not qml code on linux.Example of unicode :
What could be the reason and how to fix this ?
Thank youHere's the qml example code :
Rectangle { anchors.fill:parent color:"yellow" Column { spacing: 10 anchors.centerIn: parent Text { text: "💡😉😜 🙂📺⚠️ À regarder sur votre télévision " font.pointSize: 24 textFormat: Text.RichText } TextEdit { text: "💡😉😜 🙂📺⚠️ À regarder sur votre télévision " font.pointSize: 24 readOnly: true textFormat: Text.RichText } } }```
-
https://forum.qt.io/user/sierdzio
@sierdzio this should be better. -
install a font family that supports those icons and set the font.familiy of your qml elements to the new family
https://doc.qt.io/qt-6/qml-qtquick-text.html#font.family-prop