- FONT_STYLE
Is a json formatted string with the font's style. Possible *key, value* pairs are:
+ *width* Modifies the space between glyphs. Possible values are:
- - *ultra-condensed*
- - *extra-condensed*
+ - *ultraCondensed*
+ - *extraCondensed*
- *condensed*
- - *semi-condensed*
+ - *semiCondensed*
- *normal*
- - *semi-expanded*
+ - *semiExpanded*
- *expanded*
- - *extra-expanded*
- - *ultra-expanded*
+ - *extraExpanded*
+ - *ultraExpanded*
+ *weight* Modifies the thickness or darkness of the glyphs. Possible values are:
- *thin*
- - *ultra-light*
- - *extra-light*
+ - *ultraLight*
+ - *extraLight*
- *light*
- - *demi-light*
- - *semi-light*
+ - *demiLight*
+ - *semiLight*
- *book*
- *normal*
- *regular*
- *medium*
- - *demi-bold*
- - *semi-bold*
+ - *demiBold*
+ - *semiBold*
- *bold*
- - *ultra-bold*
- - *extra-bold*
+ - *ultraBold*
+ - *extraBold*
- *black*
- *heavy*
- - *extra-black*
+ - *extraBlack*
+ *slant* Whether to use italics. Usually *italic* is a different font whilst the *oblique* has been generated by slanting the *normal* one. Possible values are:
- *normal*
- *roman* Same as *normal*
{
"textlabel":
{
- "font-family":"FreeSerif",
- "font-style":"{\"weight\":\"bold\",\"slant\":\"italic\"}",
- "point-size":8
+ "fontFamily":"FreeSerif",
+ "fontStyle":"{\"weight\":\"bold\",\"slant\":\"italic\"}",
+ "pointSize":8
}
}
}
~~~
-However the same point-size is unlikely to be suitable for all text controls in an application.
+However the same pointSize is unlikely to be suitable for all text controls in an application.
To set custom sizes simply set a "style name" for each case, and then provide a style override in JSON:
~~~{.cpp}
{
"textlabel":
{
- "font-family":"FreeSerif",
- "font-style":"{\"weight\":\"bold\",\"slant\":\"italic\"}",
- "point-size":8
+ "fontFamily":"FreeSerif",
+ "fontStyle":"{\"weight\":\"bold\",\"slant\":\"italic\"}",
+ "pointSize":8
},
"custom":
{
- "point-size":10
+ "pointSize":10
}
}
}
~~~
-In the example above, standard text labels will have point-size 8, and "custom" labels will have point-size 10.
+In the example above, standard text labels will have pointSize 8, and "custom" labels will have pointSize 10.
*/