translate the launcher: load mod string catalogs before it draws (#794)

the launcher runs before Game:load, so #767's Strings hooks had nothing
filling the catalog and a restart could not help - the ordering is the same
every launch. reads lang/strings.lua from enabled mods only, data not the
entry chunk, sandboxed.

plus a plain pixel fallback on the ui faces, or the kana draw as tofu.
This commit is contained in:
bryanthaboi
2026-08-04 10:15:10 -04:00
committed by GitHub
parent 7d3950658a
commit f56e82de81
6 changed files with 199 additions and 1 deletions
+3 -1
View File
@@ -329,7 +329,9 @@ local function mfont(size)
size = math.max(8, math.floor(size + 0.5))
local f = measureFonts[size]
if not f then
f = love.graphics.newFont(size)
-- same fallback the rendering faces get (FlexLove FontCache), or the
-- launcher measures Latin widths for text it draws with kana
f = require("src.render.UiFont").attach(love.graphics.newFont(size), size)
measureFonts[size] = f
end
return f