Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.2, 5.1.0
-
0cca56f30d6a0290841859a58f517cece13d8d81
Description
It's not possible to use fontname with space in QML canvas element. Quote doesn't help:
- single quote
ctx.font = "bold 36px \'Bitstream Vera Sans\'"; - double quote
ctx.font = "bold 36px \"Bitstream Vera Sans\"";
According the docs it should work:
http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-context2d.html#font-prop
The default font value is "10px sans-serif". See w3C 2d context standard for font http://www.w3.org/TR/CSS21/fonts.html#propdef-font-family
To avoid mistakes in escaping, it is recommended to quote font family
names that contain white space, digits, or punctuation characters other than hyphens.