WoW:API FontInstance GetFont: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{widgetmethod}} | |||
Returns detailed information on a font object | |||
fontName = Fonts\ | fontName, fontHeight, fontFlags = MyFontObject:GetFont() | ||
== Returns == | |||
:;fontName: String - path to font file | |||
:;fontHeight: 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 | |||
:;fontFlags: String - See [[API FontInstance SetFont|FontInstance:SetFont]](). | |||
== Example == | |||
print(GameFontNormal:GetFont()); | |||
> "Fonts\FRIZQT__.TTF" | |||
> 12.000000298023 | |||
> "" | |||
== Notes == | |||
To get an integer font height, simply do <tt>math.floor(fontHeight+0.5);</tt> |
Revision as of 08:01, 29 July 2006
← Widget API ← FontInstance < GetFont
Returns detailed information on a font object
fontName, fontHeight, fontFlags = MyFontObject:GetFont()
Returns
- fontName
- String - path to font file
- fontHeight
- 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
- fontFlags
- String - See FontInstance:SetFont().
Example
print(GameFontNormal:GetFont()); > "Fonts\FRIZQT__.TTF" > 12.000000298023 > ""
Notes
To get an integer font height, simply do math.floor(fontHeight+0.5);