【本地化】添加按比例缩小文字的方法

dev_chengFeng
gaoxin 2021-02-26 15:37:50 +08:00
parent 84ae606ee9
commit 16486a13b5
1 changed files with 11 additions and 0 deletions

View File

@ -1771,6 +1771,17 @@ function GetCurLanguage()
return PlayerPrefs.GetInt("language")
end
-- 文字大小比例缩放
FontSizeScaleToZh = {
[0] = 1,
[1] = 0.9,
[2] = 0.8
}
function LanguageFontSizeFilter(text, size)
local l = GetCurLanguage()
text.fontSize = math.floor(size * FontSizeScaleToZh[l])
end
function SetHeroIcon(heroData,icon,heroConfig)
-- LogGreen("heroData.skinId:"..tostring(heroData.skinId))
if not heroData.skinId or heroData.skinId == 0 then