WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   Font Revision (https://www.wowinterface.com/forums/showthread.php?t=53452)

syncrow 05-17-16 09:53 AM

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...

VincentSDSH 05-17-16 11:15 AM

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

Lua Code:
  1. local fontObject = CreateFont("LegibleMail_Font")
  2. local isOK = fontObject:SetFont(LSM:Fetch("font", sdg.font), sdg.fontSize, "") 
  3.        
  4. OpenMailBodyText:SetFontObject(fontObject)      -- READING
  5. SendMailBodyEditBox:SetFontObject(fontObject)   -- WRITING

galvin 05-17-16 12:35 PM

Anyone know what the max size of a font is now?

syncrow 05-17-16 01:16 PM

Quote:

Originally Posted by VincentSDSH (Post 314894)
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...

semlar 05-17-16 02:25 PM

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.

syncrow 05-17-16 03:04 PM

Quote:

Originally Posted by semlar (Post 314902)
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:
  1. /run GameFontNormal:SetFont("Interface\\AddOns\\MyAddon\\Media\\Fonts\\Zero.ttf",10)
  2. -- same result

Test Macro 2:
Lua Code:
  1. /run GameFontNormal:SetFont("Fonts\\MORPHEUS.ttf",10)
  2. -- 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...

VincentSDSH 05-17-16 03:22 PM

Quote:

Originally Posted by galvin (Post 314896)
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.

Lombra 05-17-16 06:21 PM

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?

Nevcairiel 05-19-16 08:08 AM

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.

Ketho 05-19-16 08:24 AM

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"

syncrow 05-19-16 08:44 AM

Quote:

Originally Posted by Nevcairiel (Post 314966)
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... =)

Quote:

Originally Posted by Ketho (Post 314969)
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?

Nevcairiel 05-20-16 12:19 AM

External sounds work again in the latest build, however external fonts are still broken.
Hopefully next time.

Simca 05-20-16 01:53 AM

Quote:

Originally Posted by galvin (Post 314896)
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.

Gethe 05-20-16 09:46 AM

From what I can tell, the new max is 256.

ceylina 05-26-16 09:19 PM

Fonts seem to be working with the latest build :D

Nevcairiel 05-28-16 01:49 AM

Indeed, my UI isn't all screwy anymore when I enable some AddOns! :)


All times are GMT -6. The time now is 03:43 AM.

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