frozn / TipTac

WoW AddOn TipTac Reborn
GNU General Public License v3.0
109 stars 23 forks source link

font keeps resetting #180

Closed hollo6 closed 1 year ago

hollo6 commented 1 year ago

Describe the bug Every time when closing the game, tooltip font gets reset to Fritz Quadrata TT. Sometimes logging out is enough to make it happen.

To Reproduce Steps to reproduce the behavior:

  1. Open TipTac Options
  2. Set Font -> Font Face to something else (I'm using Calibri from SharedMediaAdditionalFonts).
  3. Close game and start it again.
  4. Notice the font is again back to Fritz Quadrata TT.

Expected behavior Font selection should not be reset when logging out or closing the game.

TipTac Reborn (please complete the following information):

WoW (please complete the following information):

Additional context This was working before for a long time, broke with v23.01.23.

frozn commented 1 year ago

Unfortunately I can't reproduce this. After player login (when all addons finished loading) TipTac will check if the chosen font exists. I tested it with fonts which are available on my side, but everything works fine and the font won't be reset.

Btw: I installed SharedMediaAdditionalFonts, but there's no Calibri font included:

image

hollo6 commented 1 year ago

I have added Calibri manually. Maybe a check is needed to see if SharedMedaiAdditionalFonts is already loaded? I have also rolled back to the previous version (v22.12.15) and confirmed that the issue is not present here. calibri.zip

frozn commented 1 year ago

The check for valid fonts and bar textures has just been added with the latest release to prevent some other "strange" errors which appears if there weren't valid.

It take your attached font and give it another try. 🙂

frozn commented 1 year ago

I replaced the SharedMediaAdditionalFonts.lua with your modded one and copied the font in folder fonts. Ingame I checked "Font->Modify the GameTooltip Font Templates" and set font face Calibri. After /reload or completely relogging Calibri is still in place and the GameTooltip is also using this font.

Perhaps it might be another addon interfering here? 🤔

hollo6 commented 1 year ago

I don't think it's another addon because only updating this one to a newer version will trigger the issue. I just tried the latest one with today's commits but it's still there. :( /reload and relogging won't break it, only closing the game and restarting it.

frozn commented 1 year ago

Even after closing the game and restarting the font Calibri sticks in place. Tested it under Retail with "Font Flags = None".

hollo6 commented 1 year ago

Yes that's what I'm doing, no font flag. Tested it with only TipTac and SharedMediaAdditionalFonts enabled. Still resets on client reopen.

Edit: now I get the following printout on login: TipTac: No valid Font set in option tab Font. Switching to default Font.

frozn commented 1 year ago

This is the error message I added together with the font check.

hollo6 commented 1 year ago

So what can I do now to track down this issue?

frozn commented 1 year ago

I don't have a clue actually... 🙁

hollo6 commented 1 year ago

Maybe add a (conditional) dependency for SharedMediaAdditionalFonts?

frozn commented 1 year ago

I finally have been able to reproduce this. Setting the font on an FontStringObject doesn't work reliably to check the existance of a font. Instead I create a FontObject directly and this seems to work properly.

Here's the actual dev version: TipTac-dev.zip

Maybe you can test with this version, too?

hollo6 commented 1 year ago

Yes! It indeed seems to work now. Thank you for working this out!

staneezy commented 1 year ago

This has worked for me as well. Thank you!