Reply
Thread Tools Display Modes
Unread 11-20-12, 12:44 PM   #1
Elderin
A Deviate Faerie Dragon
Join Date: Nov 2012
Posts: 14
In Game Fonts

I have not found a really good explanation of game fonts used.
But if I am right there are four fonts used in WoW.
skurri, MORPHEUS, FRIZQT__ and ARIALN

These fonts must be hardcoded within executables somewhere since I cannot locate them within my WoW installation folder/sub-folders. I can look at the Fonts.xml file and see them referenced such as
Code:
<Font virtual="true" font="Fonts\ARIALN.TTF" name="NumberFont_Outline_Large" outline="NORMAL"> 
  <FontHeight> 
    <AbsValue val="16"/> 
  </FontHeight> 
</Font> 
<Font virtual="true" font="Fonts\skurri.ttf" name="NumberFont_Outline_Huge" outline="NORMAL">
  <FontHeight> 
    <AbsValue val="30"/>
  </FontHeight> 
</Font> 
<Font virtual="true" font="Fonts\MORPHEUS.ttf" name="QuestFont_Large">
  <FontHeight>
    <AbsValue val="15"/>
  </FontHeight> 
</Font>
It appears the fonts (for example ARIALN.ttf) should be in a "Fonts" folder. Since I do not see such a folder currently I made the assumption that they are hardcoded somewhere.

I also understand that I can create my own "Fonts" folder within my WoW installation folder and place a font in that folder. However, doing so does not just add the font to Wow and make it available for use. But, I can rename it to one of the four WoW fonts, mentioned above, and bingo, all the places that font is used in WoW now looks like the font I put in the Fonts folder. So, apparently I can locally override a standard game font by this procedure. But only locally.

However, if I want to use a specific font other than the four basic WoW fonts in my addon so that users of my addon see that font can I:
create a Fonts folder in myaddon folder structure, i.e., myaddon/Fonts
place the desired font in that folder (assuming it must be a truetype font)
within xml create a font object based on my desired font such as shown above for "QuestFont_Large"
and then create FontStrings based on my new font object?

Last edited by Elderin : 11-20-12 at 12:47 PM. Reason: structuring code
Elderin is offline   Reply With Quote
Unread 11-20-12, 01:31 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,086
The default fonts are located in the game's MPQ archives. I'm not sure which one though. Also note that in order for WoW to see a file in its directory, that file needs to be there before you start up the game client. If you move or copy a file into the game's directory while it's still running, you need to close it out and restart it.
__________________
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 11-20-12 at 01:35 PM.
SDPhantom is offline   Reply With Quote
Unread 11-20-12, 03:54 PM   #3
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,739
If you want to override the default fonts, you need to add a Fonts folder in your base WoW directory, and place font files in it with the same names as WoW's default fonts, eg. World of Warcraft\Fonts\ARIALN.ttf.

If you just want additional fonts to be available to your addon, then you can just put the font file(s) in your addon's folder, and refer to it fromt here, eg. Interface\AddOns\CoolMod\CoolFont.ttf.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » General Authoring Discussion » In Game Fonts

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off