三特性: 字体分层(gen_font.py --charset + meow_font_reload_tier + font.load_full + 尺寸标记) + 全屏机制/状态栏收合(meow_ui_sys/input) + 通知#6 TF转储(CSV+10MB+开机清板载+内存表)
This commit is contained in:
1 parent
0b4d1d3215
commit
a2673d5922
18 files changed
+819
-80
No files matched your search
@@ -529,6 +529,22 @@ int meow_font_load(const char *png_path, const char *idx_path) {
|
||||
return meow_font_load_slot(0, png_path, idx_path);
|
||||
}
|
||||
|
||||
/* ---------------- 按档装载大字库(字体档位分层) ---------------- */
|
||||
/* 当前装载档位(0=common 1=gbk 2=full;仅记录,getter 走 meow_ui_gfx.c meow_font_tier) */
|
||||
static int g_reload_tier = 0;
|
||||
|
||||
int meow_font_reload_tier(int tier, const char *png_path, const char *idx_path)
|
||||
{
|
||||
if (tier < 0) tier = 0;
|
||||
if (tier > 2) tier = 2;
|
||||
if (!png_path || !png_path[0] || !idx_path || !idx_path[0]) return -1;
|
||||
/* 先 unload 旧(释放旧 atlas——大字库 GBK/Full 解码 5-15MB+,避免新旧同时驻留内存),
|
||||
* 再 load 新(slot0 = 全局/默认字库)。meow_font_load 内部即 unload+load。 */
|
||||
int r = meow_font_load(png_path, idx_path);
|
||||
if (r == 0) g_reload_tier = tier;
|
||||
return r;
|
||||
}
|
||||
|
||||
void meow_font_enable_multifont(int on) { g_multifont = on ? 1 : 0; }
|
||||
|
||||
void meow_font_set_class_slot(meow_fclass cls, int slot) {
|
||||
|
||||
Reference in new issue
Block a user