Add H2 title font (#432)

* Add H2 title font

* Bank font: re-add hinting, remove names
This commit is contained in:
Vlad 2022-12-29 19:35:27 +03:00 committed by GitHub
parent 17d2f550e8
commit 4083e5a5d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 2 deletions

View File

@ -49,8 +49,8 @@ LUI.MenuBuilder.registerType("choose_language_menu", function(a1)
menu:AddButton(Engine.Localize(string.format("MENU_%s", available_languages[i])), function() menu:AddButton(Engine.Localize(string.format("MENU_%s", available_languages[i])), function()
LUI.yesnopopup({ LUI.yesnopopup({
title = Engine.Localize("@MENU_NOTICE"), title = Engine.Localize("@MENU_NOTICE"),
text = Engine.Localize("MENU_" .. current_language) .. "" .. text = "^2" .. Engine.Localize("MENU_" .. current_language) .. "^7^5" ..
Engine.Localize("MENU_" .. available_languages[i]) .. "\n\n" .. Engine.Localize("MENU_" .. available_languages[i]) .. "\n\n^7" ..
Engine.Localize("@LUA_MENU_CONFIRM_LANGUAGE") .. " " .. Engine.Localize("@LUA_MENU_CONFIRM_LANGUAGE") .. " " ..
Engine.Localize("@MENU_APPLY_LANGUAGE_SETTINGS"), Engine.Localize("@MENU_APPLY_LANGUAGE_SETTINGS"),
callback = function(result) callback = function(result)
@ -103,3 +103,19 @@ if not Engine.InFrontend() then
return res return res
end end
end end
-- H2 title font
if game:issingleplayer() or
(user_language == "simplified_chinese" or user_language == "traditional_chinese" or user_language ==
"japanese_partial" or user_language == "korean") then
return
end
local scale = function(size)
return size * 720 / 1080
end
CoD.TextSettings.H1TitleFont = {
Font = RegisterFont("fonts/bank_h1.ttf", 50),
Height = scale(50)
}

View File

@ -1,2 +1,3 @@
localize,english localize,english
ttf,fonts/bank_h1.ttf
ttf,fonts/default.otf ttf,fonts/default.otf
1 localize english
2 ttf fonts/bank_h1.ttf
3 ttf fonts/default.otf

Binary file not shown.