WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   In Game Fonts (https://www.wowinterface.com/forums/showthread.php?t=45201)

Elderin 11-20-12 12:44 PM

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?

SDPhantom 11-20-12 01:31 PM

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.

Phanx 11-20-12 03:54 PM

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.


All times are GMT -6. The time now is 06:41 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI