View Single Post
03/12/24, 11:37 AM   #4
Mysuki
Join Date: Jun 2020
Posts: 3
Originally Posted by Baertram View Post
Actually Dan from ZOs said the font definitions (if used properly) should auto look for .slug filenames in the defined font's folder, even if the file extension is not .slug in the XML definitions of the fonts.

Kind of a fallback solution.

Are we talking about this addon? https://www.esoui.com/downloads/info...soleFonts.html

Then use Slugfont.exe to convert the files
fcm.ttf
ftn87.otf
to .slug files

Described how to do, with example scripts by Sharlikran, here:
https://www.esoui.com/forums/showthread.php?t=10761
-> Single mod folder processing by help of a *.bat (Batch) file (create an empty txtfile, paste the code from teh post into, rename to slug.bat removing the .txt at the end, move the slug.bat and slugfont.exe into the addon's font folder and then use command line to run the slug.bat file):
https://www.esoui.com/forums/showpos...04&postcount=8


As no XML font definitions were used here:
In the lua file of the addon replace the .ttf and .otf file extensions to .slug

From:
Code:
local gamepadFont_Light = "EsoUI/Common/Fonts/ftn47.otf"
local gamepadFont_Medium = "EsoUI/Common/Fonts/ftn57.otf"
local gamepadFont_Bold = "EsoUI/Common/Fonts/ftn87.otf"
local skyrimFont = "ConsoleFont/Fonts/fcm.ttf"
to:
Code:
local gamepadFont_Light = "EsoUI/Common/Fonts/ftn47.slug"
local gamepadFont_Medium = "EsoUI/Common/Fonts/ftn57.slug"
local gamepadFont_Bold = "EsoUI/Common/Fonts/ftn87.slug"
local skyrimFont = "ConsoleFont/Fonts/fcm.slug"
Search for other occurenses of .otf and .ttf in teh lua file e.g.
"EsoUI/Common/Fonts/Univers47.otf"
and replace the .otf and .ttf with .slug
Code:
    for key,value  in zo_insecurePairs(_G) do
        if (key):find("^Zo") and type(value) == "userdata" and value.SetFont then
		   local font = {value:GetFontInfo()}
		   if font[1] == "EsoUI/Common/Fonts/Univers47.otf" then
            font[1] = gamepadFont_Light
            font[2] = font[2] * 1.25
            value:SetFont(table.concat(font, "|"))
           end
           if font[1] == "EsoUI/Common/Fonts/Univers57.otf" then
            font[1] = gamepadFont_Medium
            font[2] = font[2] * 1.25
            value:SetFont(table.concat(font, "|"))
           end
           if font[1] == "EsoUI/Common/Fonts/Univers67.otf" then
            font[1] = gamepadFont_Bold
            font[2] = font[2] * 1.2
            value:SetFont(table.concat(font, "|"))
           end
        end
     end

Should hopefully be enough. Always close the game and restart it before testing that font changes!
A simple /reloadUI or reloading of the UI ingaem might not be enough. At least logout to char selection, better close the client so all cached data about fonts etc. resets.


If this does not fix it then maybe it's not possible to do it like it was done with the addon anymore. Sorry, I cannot help further then.
Thank you very much for the help! Managed to get everything working just fine <3
Quick question: do you know if its possible to change ALL the game fonts with this addon? It only changes a few spots. For and example, I can change the name of the item but not its description. Don't know the font path for it.
  Reply With Quote