Skip to content

Brand Asset Tools

Haisu Zuo edited this page Oct 9, 2026 · 1 revision

品牌资产生成工具

Historical design reference. This page records the design state at the time it was written. The versioned design assets and current product implementation are authoritative. Paths in this page are relative to the original asset directory design/brand/tools.

gen_logos.py 由字体轮廓 + 实测几何参数生成全部 SVG;render_all.sh 用本机 Chrome 无头模式批量导出 PNG/favicon。

复现步骤

  1. 下载思源黑体 Bold(SIL OFL)到 /tmp/brand-fonts/:
    mkdir -p /tmp/brand-fonts
    curl -sL -o /tmp/brand-fonts/SourceHanSansSC-Bold.otf \
      "https://cdn.jsdelivr.net/gh/adobe-fonts/source-han-sans@release/OTF/SimplifiedChinese/SourceHanSansSC-Bold.otf"
  2. 运行 bash render_all.sh(脚本内 PY 变量指向带 fontTools+Pillow 的 Python)。

微调入口(gen_logos.py)

  • CROWN_BLUE / INK:品牌色
  • BAR / WEDGE / SQUARE:图形标几何(单位制,标高 96)
  • build_horizontal() 内的 22 / 36 / 13 / 18 / 7.2:标-文间距、中文字高、行距、英文高度、中文字距

Clone this wiki locally