From 2bec83eec0dc2de2d6b8fb0b827e94807ed9b0b8 Mon Sep 17 00:00:00 2001 From: v-rob Date: Sun, 12 Jul 2020 00:48:50 -0700 Subject: Add FormSpec font styling options (#9763) * Add FormSpec font styling options * Change multiplication to stof * Remove extraneous check --- doc/lua_api.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 4e6983be8..d3a367b27 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2747,6 +2747,18 @@ Some types may inherit styles from parent types. button's content when set. * bgimg_pressed - background image when pressed. Defaults to bgimg when not provided. * This is deprecated, use states instead. + * font - Sets font type. This is a comma separated list of options. Valid options: + * Main font type options. These cannot be combined with each other: + * `normal`: Default font + * `mono`: Monospaced font + * Font modification options. If used without a main font type, `normal` is used: + * `bold`: Makes font bold. + * `italic`: Makes font italic. + Default `normal`. + * font_size - Sets font size. Default is user-set. Can have multiple values: + * ``: Sets absolute font size to `number`. + * `+`/`-`: Offsets default font size by `number` points. + * `*`: Multiplies default font size by `number`, similar to CSS `em`. * border - boolean, draw border. Set to false to hide the bevelled button pane. Default true. * content_offset - 2d vector, shifts the position of the button's content without resizing it. * noclip - boolean, set to true to allow the element to exceed formspec bounds. @@ -2758,11 +2770,15 @@ Some types may inherit styles from parent types. * scrollbar * noclip - boolean, set to true to allow the element to exceed formspec bounds. * table, textlist + * font - Sets font type. See button `font` property for more information. + * font_size - Sets font size. See button `font_size` property for more information. * noclip - boolean, set to true to allow the element to exceed formspec bounds. * dropdown * noclip - boolean, set to true to allow the element to exceed formspec bounds. * field, pwdfield, textarea * border - set to false to hide the textbox background and border. Default true. + * font - Sets font type. See button `font` property for more information. + * font_size - Sets font size. See button `font_size` property for more information. * noclip - boolean, set to true to allow the element to exceed formspec bounds. * textcolor - color. Default white. * image @@ -2771,6 +2787,8 @@ Some types may inherit styles from parent types. * item_image * noclip - boolean, set to true to allow the element to exceed formspec bounds. Default to false. * label, vertlabel + * font - Sets font type. See button `font` property for more information. + * font_size - Sets font size. See button `font_size` property for more information. * noclip - boolean, set to true to allow the element to exceed formspec bounds. * image_button (additional properties) * fgimg - standard image. Defaults to none. -- cgit v1.2.3