feat: 更新鸿蒙应用配置与功能优化
- 添加鸿蒙分层图标配置和生成脚本 - 修复数据导出JSON解析问题 - 优化关于页面和团队信息展示 - 更新应用版本至1.4.1 - 清理代码警告和冗余文件 - 添加字体和二维码测试脚本 - 完善鸿蒙适配文档和指南
This commit is contained in:
22
scripts/check_font.py
Normal file
22
scripts/check_font.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from fontTools.ttLib import TTFont
|
||||
import os
|
||||
|
||||
font_path = os.path.join(os.path.dirname(__file__), "..", "assets", "fonts", "NotoSansSC-Regular.ttf")
|
||||
font = TTFont(font_path)
|
||||
print("Tables:", list(font.keys()))
|
||||
has_glyf = "glyf" in font
|
||||
has_cff = "CFF " in font
|
||||
print(f"Has glyf (TrueType): {has_glyf}")
|
||||
print(f"Has CFF: {has_cff}")
|
||||
if has_glyf:
|
||||
print("TRUE TYPE FONT - OK for dart_pdf!")
|
||||
elif has_cff:
|
||||
print("CFF FONT - will FAIL with dart_pdf!")
|
||||
|
||||
cmap = font.getBestCmap()
|
||||
test_chars = ["小", "妈", "厨", "房", "珍", "珠", "虾", "仁"]
|
||||
for c in test_chars:
|
||||
cp = ord(c)
|
||||
found = cp in cmap
|
||||
print(f" {c} (U+{cp:04X}): {'FOUND' if found else 'MISSING'}")
|
||||
font.close()
|
||||
Reference in New Issue
Block a user