mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-16 08:11:35 +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:
@@ -107,6 +107,11 @@ function FONT_CACHE.get(size, fontPath)
|
||||
font = love.graphics.newFont(size)
|
||||
end
|
||||
|
||||
-- Per-glyph fallback so a non-Latin UI string is not drawn as tofu.
|
||||
-- pcall'd require: FlexLove is vendored and must still load standalone.
|
||||
local okUi, UiFont = pcall(require, "src.render.UiFont")
|
||||
if okUi and UiFont then UiFont.attach(font, size) end
|
||||
|
||||
-- Add to cache with LRU metadata
|
||||
FONT_CACHE[cacheKey] = {
|
||||
font = font,
|
||||
|
||||
Reference in New Issue
Block a user