Thread: Font Revision
View Single Post
05-17-16, 01:16 PM   #4
syncrow
A Flamescale Wyrmkin
 
syncrow's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 149
Originally Posted by VincentSDSH View Post
I tested Legible Mail (link in signature) and it seemed to work fine.
Pre created xml font templates:
Code:
<Font name="MyGameFont_Small" font="Interface\AddOns\MyAddon\Media\Fonts\Gothic.ttf" outline="NONE" virtual="true">
	<FontHeight val="8"/>
	<Shadow>
		<Offset x="1" y="-1" />
		<Color r="0" g="0" b="0"/>
	</Shadow>
</Font>
<Font name="MyGameFont_Medium" font="Interface\AddOns\MyAddon\Media\Fonts\Gothic.ttf" outline="NONE" virtual="true">
	<FontHeight  val="10"/>
	<Shadow>
		<Offset x="1" y="-1" />
		<Color r="0" g="0" b="0"/>
	</Shadow>
</Font>

Applying the new font:
Lua Code:
  1. function SetUIFont()
  2.     local index = usedFont
  3.     local name, small, medium = unpack(FONTLIST[index])
  4.     local path = [[Interface\AddOns\MyAddon\Media\Fonts\]]..name
  5.  
  6.     -- change font
  7.     MyGameFont_Small:SetFont(path,small,"NONE")
  8.     MyGameFont_Medium:SetFont(path,medium,"NONE")
  9. end

Doesn't work, which is pretty weird...
__________________