for key,value in zo_insecurePairs(_G) do if (key):find("^Zo") and type(value) == "userdata" and value.SetFont then local font = {value:GetFontInfo()} font[1] = "EsoUI/Common/Fonts/TrajanPro-Regular.otf" value:SetFont(table.concat(font, "|")) end end
It goes over the global table.It is possible to write simple function which will replace all fonts with Trajan Pro, but it will probably make your UI unreadable. I recommend to stick with Pawksickles, because you can define which fonts should be replaced.
If you want to try it:for key,value in zo_insecurePairs(_G) do if (key):find("^Zo") and type(value) == "userdata" and value.SetFont then local font = {value:GetFontInfo()} font[1] = "EsoUI/Common/Fonts/TrajanPro-Regular.otf" value:SetFont(table.concat(font, "|") end end
Screenshots:
http://imgur.com/a/bZLPq
All over my head my friend, I'm not even sure what do with the Code Garkin gaveFinding some values in the Global table named after a pattern (Basically this is a Font type enumeration) is exactly why I created LibConstantMapper in the first place.
I already made some tests. A total of 65 "Zo..." Variables are in the global table.
63 of those are ZoFont..., the other two are "ZoInteractionPromt" and "ZoLargeFontEdit", of wich I am not certain if they are related to this case. But garkins check for the existing function should take care of that.
I have to push the 0.6 version live before you can use it for this, but the tests look good so far.
If you want to try what code does you can either copy&paste it to the end of any .lua file in your addons folder or use @Seerah's addon ZAM Notebook which can run code snippets.Thanks for the Reply. However I'm not sure what to do with that code. Do I copy&paste it somewhere? I did try to make a .lua out of it lol, but an error keep popping up about Line 6 "end" (I believe).
Btw thanks for the help and also for sharing your Add-ons. They are most Useful.
I have tried that with every .lua file I have, this is what happens. http://i.imgur.com/Yz8MuUu.jpg
value:SetFont(table.concat(font, "|"))I have updated original post to fix the issue.