Luart
Comprehensive Windows framework to develop in Lua
modules > console > font

console.font read/write property

Get the current console font, a string value that represent the font name.
To set the console.font property, you can assign a string that represent either a font name of an installed system font, or a font file (*.ttf, *.fon...). A File can also be provided, representing a font file.

Example


local console = require "console"

console.clear()

local message = "Hello World !"
console.color = "lightyellow"
console.y = math.floor(console.height/2)

for x = 1,console.width-message:len() do
	console.x = x-1
	console.write(string.rep(" ", message:len()))
	console.x = x
	console.write(message)
	sys.sleep(1)
end