mirror of
https://github.com/YuleBest/FontMM.git
synced 2026-12-04 03:11:48 +08:00
415 lines
17 KiB
HTML
415 lines
17 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta
|
|
name="viewport"
|
|
content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover"
|
|
/>
|
|
<title>FontMM</title>
|
|
</head>
|
|
<body>
|
|
<!-- Top App Bar (滚动后标题固定在左侧, 右上角重启按钮) -->
|
|
<header class="top-app-bar">
|
|
<span class="top-app-bar__title" id="top-bar-title"></span>
|
|
<div class="top-app-bar__actions">
|
|
<md-icon-button id="reboot-btn" aria-label="重启设备">
|
|
<md-icon>autorenew</md-icon>
|
|
</md-icon-button>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- 滑动视图轨道 (三页横排, 切换/手势滑动) -->
|
|
<div class="view-track" id="view-track">
|
|
<!-- 主页视图 -->
|
|
<main id="home-view" class="view view-home active">
|
|
<div class="home-title">FontMM</div>
|
|
|
|
<!-- 模块状态 -->
|
|
<md-elevated-card class="home-card home-status-card">
|
|
<div class="home-status-icon">
|
|
<md-icon>check</md-icon>
|
|
</div>
|
|
<div class="home-status-text">
|
|
<div class="home-status-title" id="home-status">已挂载字体</div>
|
|
<div class="home-status-sub">版本 <span id="home-version">-</span></div>
|
|
</div>
|
|
</md-elevated-card>
|
|
|
|
<!-- 请我喝咖啡 -->
|
|
<md-elevated-card class="home-card home-entry-card" id="donate-card">
|
|
<div class="home-entry-row" id="donate-entry">
|
|
<div class="home-entry-icon">
|
|
<md-icon>coffee</md-icon>
|
|
</div>
|
|
<div class="home-entry-text">
|
|
<div class="home-entry-title">请我喝咖啡</div>
|
|
<div class="home-entry-sub">FontMM 将保持免费开源</div>
|
|
</div>
|
|
<md-icon class="home-entry-arrow" id="donate-arrow">expand_more</md-icon>
|
|
</div>
|
|
<div class="home-entry-expand" id="donate-expand" hidden>
|
|
<div class="home-donate-note">感谢您的自愿捐献</div>
|
|
<div class="home-donate-row">
|
|
<button class="home-donate-item" id="donate-alipay">
|
|
<span class="home-donate-logo">支付宝</span>
|
|
</button>
|
|
<button class="home-donate-item" id="donate-ifdian">
|
|
<span class="home-donate-logo">爱发电</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</md-elevated-card>
|
|
|
|
<!-- 开发者 -->
|
|
<md-elevated-card class="home-card home-entry-card">
|
|
<div class="home-entry-row" id="dev-entry">
|
|
<div class="home-entry-icon">
|
|
<md-icon>code</md-icon>
|
|
</div>
|
|
<div class="home-entry-text">
|
|
<div class="home-entry-title">开发者</div>
|
|
<div class="home-entry-sub">Yule</div>
|
|
</div>
|
|
<md-icon class="home-entry-arrow">chevron_right</md-icon>
|
|
</div>
|
|
</md-elevated-card>
|
|
|
|
<!-- 设备信息 -->
|
|
<md-elevated-card class="home-card home-info-card">
|
|
<div class="home-info-title">设备信息</div>
|
|
<div class="home-info-row">
|
|
<div class="home-info-label">系统版本</div>
|
|
<div class="home-info-value" id="home-android-version">-</div>
|
|
</div>
|
|
<div class="home-info-row">
|
|
<div class="home-info-label">设备型号</div>
|
|
<div class="home-info-value" id="home-device-model">-</div>
|
|
</div>
|
|
<div class="home-info-row">
|
|
<div class="home-info-label">系统架构</div>
|
|
<div class="home-info-value" id="home-abi">-</div>
|
|
</div>
|
|
<div class="home-info-row">
|
|
<div class="home-info-label">已安装字体</div>
|
|
<div class="home-info-value" id="home-font-count">-</div>
|
|
</div>
|
|
<div class="home-info-row">
|
|
<div class="home-info-label">元模块</div>
|
|
<div class="home-info-value" id="home-metamodule">-</div>
|
|
</div>
|
|
</md-elevated-card>
|
|
|
|
<!-- 字体预热器: 让被「卸载模块」的应用仍能正常渲染字体 -->
|
|
<md-elevated-card class="home-card home-info-card">
|
|
<div class="home-info-title">字体预热器</div>
|
|
<div class="home-info-row">
|
|
<div class="home-info-label">运行状态</div>
|
|
<div class="home-info-value" id="home-preload-status">检测中…</div>
|
|
</div>
|
|
<div class="home-info-row">
|
|
<div class="home-info-label">Zygisk 提供者</div>
|
|
<div class="home-info-value" id="home-preload-provider">-</div>
|
|
</div>
|
|
<div class="home-preload-note" id="home-preload-note" hidden></div>
|
|
</md-elevated-card>
|
|
</main>
|
|
|
|
<!-- 配置视图 -->
|
|
<main id="config-view" class="view view-config">
|
|
<div class="home-title">字体配置</div>
|
|
|
|
<div id="slots"></div>
|
|
|
|
<!-- 高级配置 (可折叠/展开) -->
|
|
<md-filled-card class="wght-advanced">
|
|
<div class="wght-advanced-header" id="wght-advanced-header">
|
|
<div class="wght-advanced-title">高级配置</div>
|
|
<md-icon class="wght-advanced-arrow">expand_more</md-icon>
|
|
</div>
|
|
|
|
<div class="wght-advanced-body">
|
|
<div class="wght-advanced-content">
|
|
<div class="wght-mode-row">
|
|
<div class="wght-mode-info">
|
|
<div class="wght-mode-title">字重覆写模式</div>
|
|
<div class="wght-mode-sub" id="wght-mode-sub">
|
|
可变字体 wght 范围与实际字重等级不符时, 按所选方式覆写 sans-serif 配置
|
|
</div>
|
|
</div>
|
|
<md-outlined-select id="wght-mode-select" label="覆写模式">
|
|
<md-select-option value="0" selected>不处理</md-select-option>
|
|
<md-select-option value="1">裁切粗细等级</md-select-option>
|
|
<md-select-option value="2">平均分配字重</md-select-option>
|
|
<md-select-option value="3">自定义映射</md-select-option>
|
|
</md-outlined-select>
|
|
</div>
|
|
|
|
<!-- 字重映射 (各模式实时预览, 修改即切为自定义) -->
|
|
<div class="wght-map" id="wght-map">
|
|
<div class="wght-map-inner">
|
|
<div class="wght-map-title">字重映射</div>
|
|
<div class="wght-map-sub">
|
|
各模式的实时映射结果 (字重等级 → wght 轴值),
|
|
修改任意值将自动切换为「自定义映射」
|
|
</div>
|
|
<div id="wght-map-rows"></div>
|
|
<div class="wght-map-footer">
|
|
<md-text-button id="wght-map-add" class="wght-map-add">
|
|
<md-icon slot="icon">add</md-icon>
|
|
新增映射
|
|
</md-text-button>
|
|
<div class="wght-map-toolbar">
|
|
<md-icon-button id="wght-map-undo" aria-label="撤销">
|
|
<md-icon>undo</md-icon>
|
|
</md-icon-button>
|
|
<md-icon-button id="wght-map-export" aria-label="导出映射">
|
|
<md-icon>file_upload</md-icon>
|
|
</md-icon-button>
|
|
<md-icon-button id="wght-map-import" aria-label="导入映射">
|
|
<md-icon>file_download</md-icon>
|
|
</md-icon-button>
|
|
<md-icon-button id="wght-map-reset" aria-label="重置映射">
|
|
<md-icon>restart_alt</md-icon>
|
|
</md-icon-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 新增字重映射对话框 -->
|
|
<md-dialog id="wght-map-add-dialog">
|
|
<div slot="headline">新增字重映射</div>
|
|
<div slot="content">
|
|
<input
|
|
type="number"
|
|
id="wght-map-add-weight"
|
|
class="wght-map-input wght-map-add-input"
|
|
min="1"
|
|
max="1000"
|
|
placeholder="字重等级 (1-1000)"
|
|
/>
|
|
</div>
|
|
<div slot="actions">
|
|
<md-text-button id="wght-map-add-cancel">取消</md-text-button>
|
|
<md-text-button id="wght-map-add-confirm">添加</md-text-button>
|
|
</div>
|
|
</md-dialog>
|
|
|
|
<!-- 映射导入/导出对话框 (base64 JSON 文本) -->
|
|
<md-dialog id="wght-map-transfer-dialog">
|
|
<div slot="headline" id="wght-map-transfer-title">导出映射</div>
|
|
<div slot="content">
|
|
<div class="wght-map-transfer-note" id="wght-map-transfer-note"></div>
|
|
<textarea
|
|
id="wght-map-transfer-input"
|
|
class="wght-map-transfer-input"
|
|
rows="4"
|
|
spellcheck="false"
|
|
></textarea>
|
|
</div>
|
|
<div slot="actions">
|
|
<md-text-button id="wght-map-transfer-cancel">取消</md-text-button>
|
|
<md-text-button id="wght-map-transfer-confirm">关闭</md-text-button>
|
|
</div>
|
|
</md-dialog>
|
|
</md-filled-card>
|
|
</main>
|
|
|
|
<!-- 字体测试视图 -->
|
|
<div id="test-view" class="view view-test">
|
|
<div class="home-title">字体测试</div>
|
|
<md-elevated-card class="test-status-card" id="test-status">
|
|
<div class="test-status-icon">
|
|
<md-icon>info</md-icon>
|
|
</div>
|
|
<div class="test-status-text" id="test-status-text">正在加载字体...</div>
|
|
</md-elevated-card>
|
|
|
|
<div id="test-content" class="test-content" hidden>
|
|
<md-elevated-card class="test-card test-card-editable" data-edit-target="test-hans">
|
|
<div class="test-section-title">
|
|
中文简体 <span class="test-tag" id="hans-tag"></span>
|
|
</div>
|
|
<div class="test-sample test-sample-hans" id="test-hans">
|
|
天地玄黄,宇宙洪荒。日月盈昃,辰宿列张。寒来暑往,秋收冬藏。ABCDE 12345
|
|
</div>
|
|
</md-elevated-card>
|
|
|
|
<md-elevated-card class="test-card test-card-editable" data-edit-target="test-hant">
|
|
<div class="test-section-title">
|
|
中文繁体 <span class="test-tag" id="hant-tag"></span>
|
|
</div>
|
|
<div class="test-sample" id="test-hant">
|
|
天地玄黃,宇宙洪荒。日月盈昃,辰宿列張。寒來暑往,秋收冬藏。ABCDE 12345
|
|
</div>
|
|
</md-elevated-card>
|
|
|
|
<md-elevated-card class="test-card test-card-editable" data-edit-target="test-en">
|
|
<div class="test-section-title">
|
|
英文 & 数字 <span class="test-tag" id="en-tag"></span>
|
|
</div>
|
|
<div class="test-sample" id="test-en">
|
|
The quick brown fox jumps over the lazy dog. 0123456789
|
|
</div>
|
|
</md-elevated-card>
|
|
|
|
<md-elevated-card class="test-card">
|
|
<div class="test-section-title">字重<span class="test-tag" id="weight-tag"></span></div>
|
|
<div class="test-var-note">
|
|
若各字重显示相同,说明字体为静态单字重或未包含对应字重。
|
|
</div>
|
|
<div class="test-w-row" style="font-weight: 100">
|
|
<span class="test-w-text">100 - 淡体 Thin</span>
|
|
</div>
|
|
<div class="test-w-row" style="font-weight: 200">
|
|
<span class="test-w-text">200 - 特细 ExtraLight</span>
|
|
</div>
|
|
<div class="test-w-row" style="font-weight: 300">
|
|
<span class="test-w-text">300 - 细体 Light</span>
|
|
</div>
|
|
<div class="test-w-row" style="font-weight: 400">
|
|
<span class="test-w-text">400 - 标准 Regular</span>
|
|
</div>
|
|
<div class="test-w-row" style="font-weight: 500">
|
|
<span class="test-w-text">500 - 适中 Medium</span>
|
|
</div>
|
|
<div class="test-w-row" style="font-weight: 600">
|
|
<span class="test-w-text">600 - 次粗 SemiBold</span>
|
|
</div>
|
|
<div class="test-w-row" style="font-weight: 700">
|
|
<span class="test-w-text">700 - 粗体 Bold</span>
|
|
</div>
|
|
<div class="test-w-row" style="font-weight: 800">
|
|
<span class="test-w-text">800 - 特粗 ExtraBold</span>
|
|
</div>
|
|
<div class="test-w-row" style="font-weight: 900">
|
|
<span class="test-w-text">900 - 浓体 Black</span>
|
|
</div>
|
|
</md-elevated-card>
|
|
|
|
<md-elevated-card class="test-card">
|
|
<div class="test-section-title">
|
|
可变字体<span class="test-tag" id="var-tag"></span>
|
|
</div>
|
|
<div class="test-var-note">
|
|
拖动滑条可预览该字体在各字重、字号下的效果,仅影响本页预览,不会修改系统字体。字重仅对可变字体
|
|
(VF) 生效,静态字体下无变化。
|
|
</div>
|
|
<div class="test-wght-row">
|
|
<span class="test-wght-label">字重</span>
|
|
<md-slider
|
|
id="wght-slider"
|
|
min="100"
|
|
max="900"
|
|
step="1"
|
|
value="400"
|
|
aria-label="字重滑条"
|
|
></md-slider>
|
|
<span class="test-wght-value" id="wght-value">400</span>
|
|
</div>
|
|
<div class="test-wght-row">
|
|
<span class="test-wght-label">字号</span>
|
|
<md-slider
|
|
id="size-slider"
|
|
min="12"
|
|
max="40"
|
|
step="1"
|
|
value="16"
|
|
aria-label="字号滑条"
|
|
></md-slider>
|
|
<span class="test-wght-value" id="size-value">16</span>
|
|
</div>
|
|
<div class="test-var-preview" id="test-var-preview">400 - 标准 Regular</div>
|
|
</md-elevated-card>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 工具视图 -->
|
|
<div id="tools-view" class="view view-tools">
|
|
<!-- 工具列表 (ToolHost 渲染卡片) -->
|
|
<div id="tools-list">
|
|
<div class="home-title">工具</div>
|
|
<div id="tools-grid"></div>
|
|
</div>
|
|
<!-- 工具页面挂载点 (打开工具时由 ToolHost 渲染) -->
|
|
<div id="tools-pages"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 悬浮应用按钮 (仅配置页, 向下滚动时隐藏) -->
|
|
<button id="apply-btn" class="fab" disabled aria-label="应用字体">
|
|
<md-icon>check_circle</md-icon>
|
|
<span>应用</span>
|
|
</button>
|
|
|
|
<!-- 测试文本编辑对话框 -->
|
|
<md-dialog id="edit-text-dialog">
|
|
<div slot="headline">编辑测试文本</div>
|
|
<div slot="content">
|
|
<md-outlined-text-field
|
|
id="edit-text-input"
|
|
type="textarea"
|
|
rows="3"
|
|
label="测试文本"
|
|
style="width: 100%"
|
|
></md-outlined-text-field>
|
|
</div>
|
|
<div slot="actions">
|
|
<md-text-button id="edit-text-cancel">取消</md-text-button>
|
|
<md-text-button id="edit-text-save">保存</md-text-button>
|
|
</div>
|
|
</md-dialog>
|
|
|
|
<!-- 重启确认对话框 -->
|
|
<md-dialog id="reboot-dialog">
|
|
<div slot="headline">重启设备?</div>
|
|
<div slot="content">重启后字体才会生效,确定要立即重启设备吗?</div>
|
|
<div slot="actions">
|
|
<md-text-button id="reboot-cancel">取消</md-text-button>
|
|
<md-text-button id="reboot-confirm">重启</md-text-button>
|
|
</div>
|
|
</md-dialog>
|
|
|
|
<!-- 日志弹窗 -->
|
|
<md-dialog id="log-dialog">
|
|
<div slot="headline">应用日志</div>
|
|
<div slot="content">
|
|
<pre
|
|
id="log-content"
|
|
style="white-space: pre-wrap; font-family: monospace; font-size: 0.8rem"
|
|
></pre>
|
|
</div>
|
|
<div slot="actions">
|
|
<md-text-button id="log-close">关闭</md-text-button>
|
|
</div>
|
|
</md-dialog>
|
|
|
|
<!-- 底部导航栏 -->
|
|
<nav class="bottom-nav">
|
|
<md-navigation-bar id="nav-bar" active-index="0">
|
|
<md-navigation-tab label="主页">
|
|
<md-icon slot="active-icon">home</md-icon>
|
|
<md-icon slot="inactive-icon">home</md-icon>
|
|
</md-navigation-tab>
|
|
<md-navigation-tab label="配置">
|
|
<md-icon slot="active-icon">tune</md-icon>
|
|
<md-icon slot="inactive-icon">tune</md-icon>
|
|
</md-navigation-tab>
|
|
<md-navigation-tab label="字体测试">
|
|
<md-icon slot="active-icon">text_fields</md-icon>
|
|
<md-icon slot="inactive-icon">text_fields</md-icon>
|
|
</md-navigation-tab>
|
|
<md-navigation-tab label="工具">
|
|
<md-icon slot="active-icon">build</md-icon>
|
|
<md-icon slot="inactive-icon">build</md-icon>
|
|
</md-navigation-tab>
|
|
</md-navigation-bar>
|
|
</nav>
|
|
|
|
<script type="module" src="/src/main.ts"></script>
|
|
</body>
|
|
</html>
|