mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-17 03:02:39 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user