View Bug Report
fonts issue
Bug #: 8915
File: nUI [Classic]
Date: 09-24-19 08:49 PM
By: suyonggan
Status: Unconfirmed
Hello, I am a player fromCN server. I have been using NUI before. Recently, I have made mistakes in the use of nostalgic clothes and formal clothes. The details are as follows. Can you help me solve this problem? Thank you!

Message: Interface\AddOns\nUI\Plugins\nUI_SysInfo.lua:326: nUI_SysInfo_LatencyBarLabel:SetText(): Font not set
Time: Sat Sep 21 21:24:14 2019
Count: 2
Stack: Interface\AddOns\nUI\Plugins\nUI_SysInfo.lua:326: nUI_SysInfo_LatencyBarLabel:SetText(): Font not set
[C]: in function `SetText'
Interface\AddOns\nUI\Plugins\nUI_SysInfo.lua:326: in function <Interface\AddOns\nUI\Plugins\nUI_SysInfo.lua:277>

Locals: (*temporary) = nUI_SysInfo_LatencyBarLabel {
enabled = true
relative_to = "nUI_SysInfo_LatencyBar"
yOfs = -1.066667
xOfs = 0
relative_pt = "BOTTOMRIGHT"
fontsize = 5.333334
value = "65毫秒"
0 = <userdata>
anchor_pt = "TOPRIGHT"
(*temporary) = "65毫秒"

RSS 2.0 Feed for Bug CommentsNotes Sort Options
By: Xrystal - 09-25-19 12:17 AM
Are you able to test it against another language, to see if it is a language only problem in Classic. As far as I know I didn't change any of nUI's language stuff but I may have missed adding a new English entry into the CN files. I will take a quick look at some point tomorrow to see if I can see something obvious.
By: Xrystal - 09-25-19 07:14 AM
Around line 469 is this block of code:
if latency.text.fontsize ~= fontsize then
latency.text.fontsize = fontsize;
latency.text:SetFont( nUI_L["font1"], fontsize * 1.75, "OUTLINE" );

Looking in the zHCN language file font1 is set as follows:
nUI_L["font1"] = "Fonts\\FZLBJW.TTF"

With the enUS language file equivalent set as follows:
nUI_L["font1"] = "Fonts\\ARIALN.TTF";

The enUS version works fine in Classic and considering I haven't touched that file since it was originally added, it should be working as it always has. If the problem only exists in the Classic version of nUI then perhaps Blizzard has removed that font from their system for some reason. If the problem exists in both retail and classic then maybe there are no chinese built in fonts. In which case .. if you look near the top of the zhCN localization file you will see lines commented like this :

nUI_L["font1"] = "Interface\\AddOns\\nUI\\Layouts\\Default\\Fonts\\Tw_Cen_MT_Bold.ttf"

These are test lines from an old version of nUI that allowed you to use custom font files inside your addon folder. Unfortunately, I don't know whether they changed that ability but it might be worth trying if this seems to be the only workable option.