Fonts not showing on Russian client (SharedMediaAdditionalFonts)
I have a very special problem with SharedMediaAdditionalFonts, it works fine on my German client but when I change the language to russian and create a char on a russian server the fonts are not loaded! Someone using my UI had this problem and I tested it out myself with the latest version to confirm.
As you can see in this screenshot AddOn loaded but you can't select other fonts: http://i.imgur.com/KZgViis.jpg I also tested it with Cyrillic fonts. Pb_ee1 the author of the AddOn stated that "all the fonts are actually registered to SharedMedia fully, however, I do have the same issue as you: they do not appear in the list of selectable fonts" and looks like he is out of ideas how to fix this. So maybe someone else here has an idea! To test yourself: 1. Change language in bnet client to russian then restart bnet 2. Open wow and change wow language to russian then close wow and restart bnet again 3. Open bnet and wow now you can create a char on russian server! |
Is the Russian locale still called "ruRU"?
|
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") Code:
local LSM = LibStub("LibSharedMedia-3.0") Code:
local LSM = LibStub("LibSharedMedia-3.0") |
Thanks for clearing this up Phanx! So the current code I have is:
Code:
if not SharedMediaAdditionalFonts then return end Coud I simply make it like this? Code:
if not SharedMediaAdditionalFonts then return end |
Your code isn't registering anything with LibSharedMedia itself. It's calling the "Register" method of "SharedMediaAdditionalFonts", and I don't have any idea what that method is doing. Most likely, it's failing to pass that third parameter on to LSM.
However, I don't really see the purpose in having that "SharedMediaAdditionalFonts" object as an intermediary anyway, regardless of whether this is your own code or the actual code in the SharedMediaAdditionalFonts addon. Just register the fonts directly with LSM -- change all instances of "SharedMediaAdditionalFonts:Register" to "LSM:Register" everything should work fine. Edit: Also, you should double-check that your font actually contains Cyrillic glyphs before flagging it as supporting the ruRU locale. Otherwise Russian users will be able to select it and get a nice UI full of ???? ??? ???? ??? ???? everywhere, which is exactly the situation LSM's locale filtering is intended to prevent. :p |
Yep I double-checked I use this font: http://de.fonts2u.com/sony-sketch-ef.schriftart
Quote:
Code:
LSM:Register("font", "Star Cine", [[Interface\Addons\LeilaMedia\Fonts\starcine.ttf]], bit.bor(LSM.LOCALE_BIT_western, LSM.LOCALE_BIT_ruRU)) |
Can use flag "255" to support all locales
Lua Code:
|
Yes, but you should not do that unless you are sure the font in question actually supports all locales -- if it doesn't include full coverage for Latin (including accented characters) and Cyrillic and Korean and Simplified Chinese and Traditional Chinese characters, you should absolutely not do that, or you will be serving up an ugly and unusable UI full of ???? ?? ??? ???? ?? to your users.
|
Quote:
I'm the maintainer of the AddOn. ^-- is the reason why I do not want to add this font to the ruRU locale. If I do, most users will have an issue using it as it does not display all characters correctly, as shown on daFont. You can still add it manually though! |
All times are GMT -6. The time now is 03:18 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI