View Single Post
04/17/24, 10:25 AM   #15
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 660
@Verling

I looked at your Links to Ru Fonts mod and other mods to see which language you are using. Are you having issues with only Cyrillic Glyphs or fonts?

I noticed you had mentioned in the past that some mods don't seem to add support for what you refer to as national fonts. You noted that Master Merchant seemed to provide options to display national fonts as one example.

I don't think what I am about to describe applies to every mod but I also need to stress that ZOS already has fallback options for the internal slug files for the game.

Here is what ZOS uses for the definitions.

Xml Code:
  1. <String name="MEDIUM_FONT" value="EsoUI/Common/Fonts/Univers57.slug" />

That defines what an author would use when adding a new font.



Xml Code:
  1. <String name="MM_ESO_CARTOGRAPHER" value="MasterMerchant/Fonts/esocartographer-bold.slug" />

So that's how the font is added for Master Merchant. When a font does not have Cyrillic glyphs if you chose that then you would see boxes [] which is sometimes refereed to as Tofu where the Cyrillic glyph should be. Tofu is the name of the box [] symbol.

Xml Code:
  1. <BackupFont originalFont="$(MM_ESO_CARTOGRAPHER)" backupFont="EsoUI/Common/Fonts/ESO_FWNTLGUDC70-DB.slug"/>
  2. <BackupFont originalFont="$(MM_ESO_CARTOGRAPHER)" backupFont="EsoUI/Common/Fonts/ESO_KafuPenji-M.slug"/>
  3. <BackupFont originalFont="$(MM_ESO_CARTOGRAPHER)" backupFont="EsoUI/Common/Fonts/Univers67Cyrillic-CondensedBold.slug"/>

When you define the BackupFont then the game knows how to find the Glyphs that the font doesn't support. If nothing is specified then you will see Tofu [].

Master Merchant may seem like there is support for national fonts as you put it but there isn't anything that MM is doing that isn't already part of the ZOS code. The added fonts may not even have support for certain languages which is why ZOS added the BackupFont to begin with. You might select some of the fonts provided by MM and the font in the MM UI may look exactly the same. That is because the ZOS code uses the BackupFont because the Cyrillic Glyphs are missing. Which would default to something like Univers67Cyrillic-CondensedBold.slug for example.

Looking at the code for Links to Ru Fonts you are searching for all the instances of Zo in the name of the font and then if your conditions are met you set the font to univers57cyrillic-condensed.slug for example. I don't do that with Master Merchant. When you do that and when the fonts don't contain the Cyrillic Glyphs the BackupFont specified by ZOS is already being used.

What you are doing may help and you might be able to provide a few instances where fonts are not displayed properly unless you have your mod active but without any mods installed all fonts are displayed using the BackupFont specified by ZOS when the Glyph doesn't exist.

Another thing I'd like to mention:

Xml Code:
  1. <Label name="$(parent)Name" font="ZoFontGame" color="3689EF" modifyTextType="NONE" horizontalAlignment="LEFT" verticalAlignment="CENTER">
  2.   <Anchor point="TOPLEFT" relativeTo="$(parent)Buyer" relativePoint="TOPLEFT" offsetX="0" offsetY="0"/>
  3.   <Anchor point="BOTTOMRIGHT" relativeTo="$(parent)Buyer" relativePoint="BOTTOMRIGHT" offsetX="0" offsetY="0"/>
  4. </Label>
Even MM uses that in its Xml files, that isn't always going to be the font used because elsewhere in the Lua code the font is set to whatever MM specifies. So changing that manually in another authors mod may not do anything because Lua code could be using SetFont to change it later. That is more like saying use ZoFontGame by default for the Label until otherwise specified.

If you are really having that many issues that you feel like you need to "search and autocorrect the entire catalog of addons in the entire catalog code" then I would look at the mods you have installed. Maybe you simply need to uninstall some older mods that don't have recent updates to work correctly with the current code for the game. Doing that may make other mods that have recent updates function more to your expectations.
  Reply With Quote