Name
font:GetUnicodeWidth -- get Unicode character width
Synopsis
w = font:GetUnicodeWidth(code)
Function
font:GetUnicodeWidth() gets the width of a Unicode character in a specific font. The actual width of the character on the page can be calculated as follows:

 
char_width = font:GetUnicodeWidth(font, UNICODE)
actual_width = char_width * FONT_SIZE / 1000

Returns character width on success. Otherwise, returns Nil.

Inputs
code
a Unicode character
Results
w
Unicode character width

Show TOC