Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API FontInstance GetFont
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{widgetmethod|FontInstance}} 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 [[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>
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Widget
(
edit
)
Template:Widgetmethod
(
edit
)