mirror of
https://github.com/YuleBest/FontMM.git
synced 2026-12-04 03:11:48 +08:00
- 新架构: src/ 模块源 + web/ WebUI (Vite + TS + Material Web MD3) - WebUI: 字体槽位/应用、字体测试(字重/可变字体/字号)、关于页、底部导航、edge-to-edge、跟随系统主题 - 打开 WebUI 时用 opentype.js 解析 FONT/ 字体名称填充卡片 - 打包: preplace/template 两版 + build:only-web (webroot.zip) - 工具链: oxlint/oxfmt/type-check/shellcheck; 移除旧 template/ v1 结构与 CI - 新增 MIT LICENSE
28 lines
664 B
Bash
28 lines
664 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
FONT_DIR="$SCRIPT_DIR/src/system/fonts"
|
|
|
|
# 字体清单(记得和 customize.sh 保持一致)
|
|
all_fonts='SysSans-Hans-Regular.ttf
|
|
SysFont-Static-Regular.ttf
|
|
SysFont-Myanmar.ttf
|
|
SysFont-Hans-Regular.ttf
|
|
SysFont-Regular.ttf
|
|
SysSans-Hant-Regular.ttf
|
|
SysFont-Hant-Regular.ttf
|
|
SysSans-En-Regular.ttf'
|
|
|
|
mkdir -p "$FONT_DIR"
|
|
|
|
count=0
|
|
while IFS= read -r font; do
|
|
[ -z "$font" ] && continue
|
|
: > "$FONT_DIR/$font"
|
|
echo "[*] 已生成空字体: $font"
|
|
count=$((count + 1))
|
|
done <<< "$all_fonts"
|
|
|
|
echo "[✓] 完成,共 $count 个空字体 -> $FONT_DIR"
|