View Single Post
09/27/17, 08:31 AM   #74
rockingdice
 
rockingdice's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2017
Posts: 10
Originally Posted by ZOS_ChipHilseberg View Post
We could potentially do something like:

[Font:ZoFontGame] = "xyz.otf|32"

Where this would make a font object with the name and descriptor. Would that be sufficient?
So chip, it's not sufficient.

I've already ask in the other post but I'll ask once again...

There's some situation that the code is not using ZoFont*****, but "$(GAMEPAD_MEDIUM_FONT)" instead. If we cannot replace the value of GAMEPAD_MEDIUM_FONT, we cannot replace the font.

You can see the file:
esoui\esoui\common\tooltip\tooltipstyles.lua

Lua Code:
  1. tooltip =
  2.     {
  3.         width = ZO_GAMEPAD_CONTENT_WIDTH,
  4.         paddingLeft = 0,
  5.         paddingRight = 0,
  6.         fontFace = "$(GAMEPAD_MEDIUM_FONT)",
  7.         fontColorType = INTERFACE_COLOR_TYPE_GAMEPAD_TOOLTIP,
  8.         fontColorField = GENERAL_COLOR_GREY,
  9.         fontStyle = "soft-shadow-thick",
  10.     },

Also, there's a major issue that most add-on authors are not using ZoFont***** at all, they use like '$(GAMEPAD_MEDIUM_FONT)|$(GP_61)|soft-shadow-thick', and if we want to localize those add-ons, we have to modify their codes to change to other fonts.

So we need a way to change the value of:

Lua Code:
  1. <String name="MEDIUM_FONT" value="EsoUI/Common/Fonts/Univers57.otf" />
  2.     <String name="BOLD_FONT" value="EsoUI/Common/Fonts/Univers67.otf" />
  3.     <String name="CHAT_FONT" value="EsoUI/Common/Fonts/Univers57.otf" />
  4.    
  5.     <String name="GAMEPAD_LIGHT_FONT" value="EsoUI/Common/Fonts/FTN47.otf" />
  6.     <String name="GAMEPAD_MEDIUM_FONT" value="EsoUI/Common/Fonts/FTN57.otf" />
  7.     <String name="GAMEPAD_BOLD_FONT" value="EsoUI/Common/Fonts/FTN87.otf" />
  8.  
  9.     <String name="ANTIQUE_FONT" value="EsoUI/Common/Fonts/ProseAntiquePSMT.otf" />
  10.     <String name="HANDWRITTEN_FONT" value="EsoUI/Common/Fonts/Handwritten_Bold.otf" />
  11.     <String name="STONE_TABLET_FONT" value="EsoUI/Common/Fonts/TrajanPro-Regular.otf" />
  Reply With Quote