Thread Tools Display Modes
03/12/24, 10:06 AM   #1
Mysuki
Join Date: Jun 2020
Posts: 3
Need help with "dead" AddOn

Hi.
I have absolute ZERO knowledge about LUA files. There's an AddOn called ConsoleFont that changes some fonts from the gamepad interface to the console interface. Always played this game with my controller, so this is my favorite AddOn since it allows me to change to my usual Font (I also use that font on my World of Warcraft interface). With this new update 41, the addon is now broken. Already coverted my fonts to .slug but the addon still not working. Idk if I have to change any paths inside the lua file, but like I said, I don't have any knowledge about lua files and the addon has been dead since 2020 with NO updates or response from the author.
So I may need some guidance here
  Reply With Quote
03/12/24, 10:09 AM   #2
Antisenil
 
Antisenil's Avatar
Join Date: Aug 2018
Posts: 7
yes, just go into the ConsoleFont.lua and change all ".ttf" and ".otf" to ".slug"

edit: spelling error
  Reply With Quote
03/12/24, 10:25 AM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
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.

Last edited by Baertram : 03/12/24 at 10:33 AM.
  Reply With Quote
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
03/12/24, 11:58 AM   #5
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
No, afaik it is not possible (Sharlikran asked ZOs Dan Batson as he needed to change 1 game font in total with a font tha contains Korean glyphs -> And Zos told us it is not possible to exchange a totla font so it affects everywhere ingame).
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Need help with "dead" AddOn


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off