Better polish/russian fonts #301

This commit is contained in:
Federico Cecchetto 2022-07-15 02:58:44 +02:00
parent 1c7ec6e3a7
commit 947b0b3596
4 changed files with 16 additions and 1 deletions

BIN
data/polrus/fonts/bank.ttf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -71,11 +71,24 @@ local function usingspeciallanguage()
["portuguese"] = true,
["spanishna"] = true,
["english_safe"] = true,
["russian"] = true,
["polish"] = true,
["russian_partial"] = true,
}
return normalfontlangs[lang] ~= true
end
LUI.UIButtonText.IsOffsetedLanguage = function()
if Engine.IsRightToLeftLanguage() then
return true
elseif Engine.IsAsianLanguage() then
return true
else
return false
end
end
LUI.MenuBuilder.registerType("choose_language_menu", function(a1)
local menu = LUI.MenuTemplate.new(a1, {
menu_title = "@LUA_MENU_CHOOSE_LANGUAGE",
@ -92,7 +105,9 @@ LUI.MenuBuilder.registerType("choose_language_menu", function(a1)
local id = languages[i].id
if (not usingspeciallanguage()) then
if (id == 5 or (id >= 8 and id < 12) or id == 17) then
if (id == 5 or id == 6 or id == 17) then
LUI.MenuGenericButtons.ButtonLabelFont.Font = RegisterFont("polrus/fonts/default.otf", 30)
elseif (id >= 8 and id < 12) then
LUI.MenuGenericButtons.ButtonLabelFont.Font = RegisterFont("fonts/noto_sans_sc.otf", 30)
overrideyoffset = 0
LUI.MenuGenericButtons.ButtonLabelFont.Height = 17