Font Revision - WoWInterface
05-17-16, 09:53 AM   #1
syncrow
A Flamescale Wyrmkin

Join Date: Jul 2014
Posts: 149
Font Revision

Hey guys!

Changing Font-Objects using :SetFont() seems to not update the font file. I wonder if this is intended or being a bug due to the new font scale changes made...
__________________

05-17-16, 11:15 AM   #2
VincentSDSH

Join Date: Jun 2006
Posts: 345
I tested Legible Mail (link in signature) and it seemed to work fine. Here's a snip of the fontObject:SetFont() call.

Lua Code:
`local fontObject = CreateFont("LegibleMail_Font")local isOK = fontObject:SetFont(LSM:Fetch("font", sdg.font), sdg.fontSize, "")          OpenMailBodyText:SetFontObject(fontObject)      -- READINGSendMailBodyEditBox:SetFontObject(fontObject)   -- WRITING`
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail

05-17-16, 12:35 PM   #3
galvin
A Cobalt Mageweaver
Join Date: Nov 2006
Posts: 241
Anyone know what the max size of a font is now?

05-17-16, 01:16 PM   #4
syncrow
A Flamescale Wyrmkin

Join Date: Jul 2014
Posts: 149
 Originally Posted by VincentSDSH 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"/>
<Offset x="1" y="-1" />
<Color r="0" g="0" b="0"/>
</Font>
<FontHeight  val="10"/>
<Offset x="1" y="-1" />
<Color r="0" g="0" b="0"/>
</Font>```

Applying the new font:
Lua Code:
`function SetUIFont()    local index = usedFont    local name, small, medium = unpack(FONTLIST[index])    local path = [[Interface\AddOns\MyAddon\Media\Fonts\]]..name     -- change font    MyGameFont_Small:SetFont(path,small,"NONE")    MyGameFont_Medium:SetFont(path,medium,"NONE")end`

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

05-17-16, 02:25 PM   #5
semlar
A Pyroguard Emberseer

Join Date: Sep 2007
Posts: 1,056
It's impossible to tell from your code whether you simply have the font path wrong because it's being dynamically created using resources outside of what's here.

05-17-16, 03:04 PM   #6
syncrow
A Flamescale Wyrmkin

Join Date: Jul 2014
Posts: 149
 Originally Posted by semlar It's impossible to tell from your code whether you simply have the font path wrong because it's being dynamically created using resources outside of what's here.
Double checked that, and the paths are correct!
Btw. the hardcoded xml font paths are working...

Tested some things...

Test Macro 1:
Lua Code:
`/run GameFontNormal:SetFont("Interface\\AddOns\\MyAddon\\Media\\Fonts\\Zero.ttf",10)-- same result`

Test Macro 2:
Lua Code:
`/run GameFontNormal:SetFont("Fonts\\MORPHEUS.ttf",10)-- does work`

Using Macro 2 and than Macro 1 afterwards = changed it back to which font it was before...(I guess "Fonts\FRIZQT__.TTF")

This is pretty weird & seems to be bug...
__________________

Last edited by syncrow : 05-17-16 at 03:44 PM.

05-17-16, 03:22 PM   #7
VincentSDSH

Join Date: Jun 2006
Posts: 345
 Originally Posted by galvin Anyone know what the max size of a font is now?
I was able to adjust the mailbox font to 64. Setting the number larger didn't produce a change. I don't know if that's a limitation in the mailbox tough.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail

Last edited by VincentSDSH : 05-20-16 at 10:46 PM.

05-17-16, 06:21 PM   #8
Lombra
A Molten Giant

Join Date: Nov 2006
Posts: 554
I have a very vague memory of some issue involving changing fonts from ages ago. Need to do it early in the UI loading process, perhaps?
__________________
Grab your sword and fight the Horde!

05-19-16, 08:08 AM   #9
Nevcairiel
Join Date: Aug 2006
Posts: 60
Custom font files are broken in the current Beta Build. Its supposed to be fixed in the next one or so, so if your problems are only appearing with new fonts placed in addons, then wait for that to be resolved.

05-19-16, 08:24 AM   #10
Ketho
A Molten Giant
Join Date: Mar 2010
Posts: 847
I could set the combat text to a custom font at least
Not sure if it's different from just using :SetFont
Code:
`DAMAGE_TEXT_FONT = "Interface\\AddOns\\AnyFont\\font.ttf"`

05-19-16, 08:44 AM   #11
syncrow
A Flamescale Wyrmkin

Join Date: Jul 2014
Posts: 149
 Originally Posted by Nevcairiel Custom font files are broken in the current Beta Build. Its supposed to be fixed in the next one or so, so if your problems are only appearing with new fonts placed in addons, then wait for that to be resolved.
I thought that too, cause it just works fine on live, so we have to wait for that... =)

 Originally Posted by Ketho I could set the combat text to a custom font at least Not sure if it's different from just using :SetFont
Maybe because the combat text inherits the font path from that global variable?
__________________

Last edited by syncrow : 05-19-16 at 08:46 AM.

05-20-16, 12:19 AM   #12
Nevcairiel
Join Date: Aug 2006
Posts: 60
External sounds work again in the latest build, however external fonts are still broken.
Hopefully next time.

05-20-16, 01:53 AM   #13
Simca
An Aku'mai Servant

Join Date: Jan 2012
Posts: 33
 Originally Posted by galvin Anyone know what the max size of a font is now?
It's either 1000px or 1200px. I tested it at Semlar's insistence back in the very first alpha build where scripts were still enabled.
__________________
WoW database file expert - ask me anything

05-20-16, 09:46 AM   #14
Gethe
RealUI Developer

Join Date: Sep 2008
Posts: 908
From what I can tell, the new max is 256.
__________________
Knowledge = Power; Be OP

05-26-16, 09:19 PM   #15
ceylina
A Wyrmkin Dreamwalker
Join Date: Oct 2014
Posts: 50
Fonts seem to be working with the latest build

05-28-16, 01:49 AM   #16
Nevcairiel