API FontInstance GetFont

104,672pages on
this wiki
Add New Page
Talk0 Share
Widget API ← FontInstance < GetFont

Returns detailed information on a font object

fontName, fontHeight, fontFlags = MyFontObject:GetFont()

Returns Edit

String - path to font file
Number - font height in pixels. Due to internal graphics engine workings, this will be ridiculously close to an integer number, but not quite ever fully
String - See FontInstance:SetFont().

Example Edit


> "Fonts\FRIZQT__.TTF"
> 12.000000298023
> ""

Notes Edit

To get an integer font height, simply do math.floor(fontHeight+0.5);

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki