Window.fontstyle read/write property


Get or set the window font style, a table value that contains the following keys/values :

  • "italic" : set to true if the font is in italic.
  • "underline" : set to true if the font is underlined.
  • "strike" : set to true if the font is striked.
  • "thin" : set to true if the font is thin.
  • "bold" : set to true if the font is bold.
  • "heavy" : set to true if the font is heavy.
By changing the font style of the window, you also change the font style of any newly created child controls.

Example

local ui = require "ui" -- create a simple window local win = ui.Window("Window.fontstyle sample", 320, 200) win.font = "Times New Roman" win.fontstyle = { bold = true, italic = true } local label = ui.Label(win, "Hello World in '"..win.font.."' font") win:show() -- update the user interface until the user closes the window repeat ui.update() until not win.visible