字重结构+family→字重子菜单(agent-111: fonts/<family>/<weight>/, gen_font.py --weight, 两级扫描, s_font_dropdown子菜单) + 全屏左滑滑条修复(agent-112)
This commit is contained in:
1 parent
e8fa373a2f
commit
b75ecce5de
16 files changed
+531
-164
No files matched your search
+17
-16
@@ -29,12 +29,12 @@
|
||||
#define FBIO_WAITFORVSYNC 0x4620
|
||||
|
||||
#define FB_DEV "/dev/fb0"
|
||||
#define MEOW_FONT_PNG_CARD "/usr/data/mnt/sd_0/MeowOS/fonts/default/font.png"
|
||||
#define MEOW_FONT_IDX_CARD "/usr/data/mnt/sd_0/MeowOS/fonts/default/font.idx"
|
||||
#define MEOW_FONT_PNG_CARD "/usr/data/mnt/sd_0/MeowOS/fonts/default/regular/font.png"
|
||||
#define MEOW_FONT_IDX_CARD "/usr/data/mnt/sd_0/MeowOS/fonts/default/regular/font.idx"
|
||||
#define MEOW_FONT_PNG_SYS "/usr/share/meowos/font/font.png"
|
||||
#define MEOW_FONT_IDX_SYS "/usr/share/meowos/font/font.idx"
|
||||
/* 默认字库(卡 MeowOS/fonts/default)与固件内置之外,launcher 会把「当前生效字体」
|
||||
* 经环境变量下发给 app(见 meow_launcherd.c launch_app / meow_font_effective_paths):
|
||||
/* 默认字库(卡 MeowOS/fonts/default/regular,M2.6 字重结构)与固件内置之外,launcher 会把
|
||||
* 「当前生效字体」经环境变量下发给 app(见 meow_launcherd.c launch_app / meow_font_effective_paths):
|
||||
* MEOW_FONT_PNG / MEOW_FONT_IDX = 绝对路径;MEOW_FONT_APP = <family> 或 "default"。
|
||||
* SDK load_font 优先读 env(匹配系统 font.file),无则回退卡默认 → 固件。 */
|
||||
|
||||
@@ -361,18 +361,19 @@ void meow_ui_swipe_hint(int x)
|
||||
* 有状态栏(非全屏)→ y = 状态栏高度;收合(collapsed)→ y=提示线下缘
|
||||
* (MUI_SBAR_COLLAPSE_H,与提示线不重叠);无状态栏(全屏/隐藏)→ y=0。 */
|
||||
int hy = meow_ui_statusbar_height();
|
||||
if (x > 0) {
|
||||
if (x > g_xres) x = g_xres;
|
||||
/* 往回滑(新长度 < 上次)时,先清掉「上次画到旧长度、但本次超出的部分」,
|
||||
* 否则条只增不减(用户要求:右滑变长、左滑回缩实时可见)。 */
|
||||
if (g_hint_last > x) meow_ui_fill_rect(0, hy, g_hint_last, MUI_HINT_H, th->bg);
|
||||
meow_ui_fill_rect(0, hy, x, MUI_HINT_H, th->accent);
|
||||
g_hint_last = x;
|
||||
} else if (g_hint_last > 0) {
|
||||
/* 手指回原点/抬手未达标/抬手达标:清掉此前画的条(填回背景色) */
|
||||
meow_ui_fill_rect(0, hy, g_hint_last, MUI_HINT_H, th->bg);
|
||||
g_hint_last = 0;
|
||||
/* x<0 视为清空(条长 0);条长上限=屏宽。 */
|
||||
if (x < 0) x = 0;
|
||||
if (x > g_xres) x = g_xres;
|
||||
/* 只按「新旧长度的差」增量绘制,避免整段重涂背景色:
|
||||
* - 伸长:仅补画新增段(旧段已是 accent,不再用 bg 重涂——否则 app 底色≠theme bg
|
||||
* 时会在旧段留下 bg 色块,就是残留残条);
|
||||
* - 回缩/清空:仅把「超出新长度」的尾部填回背景色(实时回缩)。 */
|
||||
if (x > g_hint_last) {
|
||||
meow_ui_fill_rect(g_hint_last, hy, x - g_hint_last, MUI_HINT_H, th->accent);
|
||||
} else if (x < g_hint_last) {
|
||||
meow_ui_fill_rect(x, hy, g_hint_last - x, MUI_HINT_H, th->bg);
|
||||
}
|
||||
g_hint_last = x;
|
||||
/* 不发 flush:由调用方 meow_ui_flush_region(0,0,宽,6) 只刷顶部条 */
|
||||
}
|
||||
|
||||
@@ -704,7 +705,7 @@ int meow_font_set_tier(int tier)
|
||||
/* 字库加载优先级(M2.x):
|
||||
* 1) 环境变量 MEOW_FONT_PNG/MEOW_FONT_IDX(launcher 注入的「当前生效字体」= 系统 font.file)
|
||||
* —— app 未自带字库(§5.7 load_handle 未实现)时跟随系统 font.file;
|
||||
* 2) 卡默认 MeowOS/fonts/default/font.png(不再硬编码 MeowAPPs/fonts);
|
||||
* 2) 卡默认 MeowOS/fonts/default/regular/font.png(M2.6 字重结构;不再硬编码 MeowAPPs/fonts);
|
||||
* 3) 固件 /usr/share/meowos/font/font.png。
|
||||
* 全失败 → g_mfont_ready=0,text_draw 回退 5x7 点阵(系统不死)。 */
|
||||
static int load_font(void)
|
||||
|
||||
Reference in new issue
Block a user