View Single Post
09-25-16, 08:59 PM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
This isn't a bug. LibSharedMedia assumes by default that fonts registered to it only support the Latin alphabet, and ignores them in Russian, Korean, or Chinese clients. If a font does include Cyrillic (Russian), Chinese, and/or Korean glyphs, the addon registering it needs to tell LSM that by passing the optional third argument to :Register.

See the API documentation here:

https://www.wowace.com/addons/libsha...-data-langmask

https://www.wowace.com/addons/libsha...mask-constants

Example of registering a font that includes Latin and Cyrillic glyphs:

Code:
local LSM = LibStub("LibSharedMedia-3.0")
LSM:Register("font", "PT Sans",
    "Interface\\AddOns\\PhanxMedia\\font\\PTSans.ttf",
    bit.bor(LSM.LOCALE_BIT_western, LSM.LOCALE_BIT_ruRU))
Example of registering a font with Latin and Chinese glyphs:

Code:
local LSM = LibStub("LibSharedMedia-3.0")
LSM:Register("font", "XYZ",
    "Interface\\AddOns\\PhanxMedia\\font\\XYZ.ttf",
    bit.bor(LSM.LOCALE_BIT_western, LSM.LOCALE_BIT_zhCN, LSM.LOCALE_BIT_zhTW))
Example of registering a font with Chinese and Korean glyphs (no Latin):

Code:
local LSM = LibStub("LibSharedMedia-3.0")
LSM:Register("font", "ABC",
    "Interface\\AddOns\\PhanxMedia\\font\\ABC.ttf",
    bit.bor(LSM.LOCALE_BIT_koKR, LSM.LOCALE_BIT_zhCN, LSM.LOCALE_BIT_zhTW))
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote