-
Notifications
You must be signed in to change notification settings - Fork 73
Ttf FontSizeUnicode
Tangent 128 edited this page Mar 28, 2015
·
3 revisions
Compute the text size.
w, h, err = function Font:sizeText(seq)
- seq, a sequence table of all unicode characters
- w, the width or nil on failure
- h, the height or nil on failure
- err, the error message
-- "Gérard"
local s = { 'G', 233, 'r', 'a', 'r', 'd' }
-- f is a font loaded with ttf.openFont
local w, h = f:sizeUnicode(s)