Canvas.font readwrite


Get or set the current Canvas font, a string representing a font family name, from the Windows system fonts.

Example

--! luart-extensions import ui require "canvas" -- create a fixed Window local win = ui.Window("Canvas:align() sample", "fixed", 320, 200) -- create a Canvas local canvas = ui.Canvas(win) -- align the Canvas in all of its parent area canvas.font = "Times New Roman" canvas.fontsize = 40 -- don't use onPaint() event, draw only once canvas:print(canvas.font, 6, 70) await win:showasync()