diff --git a/api/config.lua b/api/config.lua index aad9452c..7ce1eff5 100644 --- a/api/config.lua +++ b/api/config.lua @@ -34,7 +34,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("global", nil, "font_unit_size", "12") pfUI:UpdateConfig("global", nil, "font_combat", "Interface\\AddOns\\pfUI\\fonts\\Continuum.ttf") - pfUI:UpdateConfig("global", nil, "force_region", "1") + pfUI:UpdateConfig("global", nil, "force_region", "0") pfUI:UpdateConfig("global", nil, "errors_limit", "1") pfUI:UpdateConfig("global", nil, "errors_hide", "0") pfUI:UpdateConfig("global", nil, "hidebuff", "0") diff --git a/env/fonts.lua b/env/fonts.lua index b534a221..44727f68 100644 --- a/env/fonts.lua +++ b/env/fonts.lua @@ -8,6 +8,19 @@ else end function pfUI.environment:UpdateFonts() + -- force locale based fonts + if pfUI_config and pfUI_config.global and pfUI_config.global.force_region == "1" then + if GetLocale() == "zhCN" then + pfUI_config.global.font_default = "Fonts\\FZXHLJW.TTF" + pfUI_config.global.font_combat = "Fonts\\FZXHLJW.TTF" + pfUI_config.global.font_unit = "Fonts\\FZXHLJW.TTF" + elseif GetLocale() == "koKR" then + pfUI_config.global.font_default = "Fonts\\2002.TTF" + pfUI_config.global.font_combat = "Fonts\\2002.TTF" + pfUI_config.global.font_unit = "Fonts\\2002.TTF" + end + end + if pfUI_config and pfUI_config.global and pfUI_config.global.font_default then pfUI.font_default = pfUI_config.global.font_default or "Interface\\AddOns\\pfUI\\fonts\\Myriad-Pro.ttf" pfUI.font_unit = pfUI_config.global.font_unit or "Interface\\AddOns\\pfUI\\fonts\\BigNoodleTitling.ttf" @@ -18,19 +31,6 @@ function pfUI.environment:UpdateFonts() pfUI.font_combat = "Interface\\AddOns\\pfUI\\fonts\\Continuum.ttf" end - -- force locale based fonts - if pfUI_config and pfUI_config.global and pfUI_config.global.force_region == "1" then - if GetLocale() == "zhCN" then - pfUI.font_default = "Fonts\\FZXHLJW.TTF" - pfUI.font_combat = "Fonts\\FZXHLJW.TTF" - pfUI.font_unit = "Fonts\\FZXHLJW.TTF" - elseif GetLocale() == "koKR" then - pfUI.font_default = "Fonts\\2002.TTF" - pfUI.font_combat = "Fonts\\2002.TTF" - pfUI.font_unit = "Fonts\\2002.TTF" - end - end - STANDARD_TEXT_FONT = pfUI.font_default; UNIT_NAME_FONT = pfUI.font_default; DAMAGE_TEXT_FONT = pfUI.font_combat;