Files
zhangxiang a57826f710 docs(brand): 品牌全案手册与落库证据入库(判据、门禁、负例都在场)
BRAND-MANUAL.md 收敛识别方案裁定与实测判据;TOKEN-MIGRATION.md 记 P1/P3/P4 迁移面与孪生缺陷;
TEST-PATCH.md 记 P7 的 1→0 实测。随包入库的是结论赖以成立的仪器与证据:check-assets、check-manual、
verify-assets-cross、check-wordmark-copies、check-docsync、check-probes(四段闸,每段带能失败的负例)、
check-baseline-shift.cjs(平移感知基线判据,四合成样本两绿两红自测通过;它取代被证伪的
「diff 包围盒不许越页眉带」)与 measured/baseline-shift-p1.json(第一批 104 张逐张分类,带 _src 出处戳)。

大体积工作件不入库:样机 HTML 与栅格截图 100+MB、字体母版 45MB 留在盘上,入库 690 个文本/矢量件。
2026-10-16 19:23:28 +08:00

114 lines
6.0 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
第四刀:只修「日」的接缝
第三刀 K1/K2 的环在正上方留了一个结——起笔的钝头比环身粗,读成瘤而不是笔。
真写环时接缝本来就该看见(搭接),但它应该是「尾压过头」而不是「头鼓出来」。
这一刀只动两个参数:起笔角度 a0(接缝位置)与起笔宽度(profile 首值)。
"""
import importlib.util
import os
HERE = os.path.dirname(os.path.abspath(__file__))
def load(name, path):
sp = importlib.util.spec_from_file_location(name, path)
m = importlib.util.module_from_spec(sp)
sp.loader.exec_module(m)
return m
n5 = load("n5", os.path.join(HERE, "n5-refine.py"))
bf = load("bf", os.path.join(HERE, "brush-family.py"))
ri = load("ri", os.path.join(HERE, "ri.py"))
g2 = load("g2", os.path.join(HERE, "glyphs2.py"))
RED, INK, WHITE = n5.RED, n5.INK, n5.WHITE
ring, bar, CX, BCY = ri.ring, ri.bar, ri.CX, ri.BCY
# 起笔收到 0.78:入纸即按,但不再鼓出环身
P_SOFT = [(0.00, 0.78), (0.09, 1.00), (0.36, 1.04), (0.64, 0.96),
(0.86, 0.70), (1.00, 0.20)]
# 尾越过起笔 14°,让搭接成为「压」而不是「碰」
OV = 374.0
BAR_IN = lambda: bar(15.5, 12.0) # noqa: E731
DOT_IN = lambda: bf.stroke(ri.arc_c(CX, BCY, 6.5, 5.0, -90, 372, 0.0, 0.0), # noqa: E731
[(0, .7), (.5, 1), (1, .7)], 11.0, steps=140)
def core(a0, prof, inner):
return ring(27.0, 35.0, 12.6, a0=a0, sweep=OV, prof=prof) + inner()
ITEMS = [
dict(id="L1", nm="日 · 顶缝(原)", src="第三刀 K1 原样,对照", body=lambda: core(-90.0, ri.P_RING, BAR_IN),
note="接缝在正上方、起笔从 0.50 突变到 0.98,所以鼓成一个瘤。这一版留着是为了让你看见差别。"),
dict(id="L2", nm="日 · 顶缝轻入", src="只改起笔宽度", body=lambda: core(-90.0, P_SOFT, BAR_IN),
note="起笔从 0.50 提到 0.78(不再从细处入纸),搭接加长到 14°。瘤变成一处可解释的按笔。"),
dict(id="L3", nm="日 · 左上缝", src="只改接缝位置", body=lambda: core(-118.0, P_SOFT, BAR_IN),
note="接缝移到左上——写「口 / 日」外框时笔本来起落的位置,所以搭接读起来像写法,不像缺陷。"),
dict(id="L4", nm="日 · 左上缝 + 点", src="环加瞳", body=lambda: core(-118.0, P_SOFT, DOT_IN),
note="把 L3 的横实换成点。环 + 瞳,是这一批里最接近「一个标志」的组合。"),
dict(id="L5", nm="日 · 顶缝 + 点", src="对照", body=lambda: core(-90.0, P_SOFT, DOT_IN),
note="K2 的接缝修复版,与 L4 只差接缝角度。"),
dict(id="L6", nm="日 · 扁 + 左上缝", src="第三刀 K3 的接缝修复", body=lambda:
ring(33.0, 29.0, 12.4, a0=-118.0, sweep=OV, prof=P_SOFT) + bar(19.0, 11.6),
note="扁环配左上缝。横向余量最大,与字标的方块咬合最紧。"),
]
card, lockup, mark_only = ri.card, ri.lockup, ri.mark_only
def build():
P = []
w = P.append
w('<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8">'
'<meta name="viewport" content="width=device-width,initial-scale=1">'
'<title>字源批 · 第四刀 日的接缝 · 2026-10-13</title>')
w('<style>' + ri.CSS.replace("__GEIST__", ri.gl.ms.GEIST_B64) + '</style></head><body><div class="wrap">')
w('<header class="top"><div class="eyebrow">Fourth cut · 2026-10-13 · 评审稿(repo 零改动)</div>')
w('<h1>字源批 · <em>第四刀:日的接缝</em></h1>')
w('<p class="lede">三批共 19 版筛下来,眼睛只留下「日」这一个新形——闭合环加中心一实,'
'厚重、朱砂、有字理(日=明=睿;且与 NOVALON 词根 nov- 在「日新」上相接:'
'苟日新,日日新,又日新)。它唯一的毛病是环顶那个结。这一刀只修它。</p></header>')
for it in ITEMS:
w(card(it["id"], it["nm"], it["body"](), it["note"], it["src"]))
w(card("K4", "目 · 纵(第三刀)", ri.k4_mu_v(), "参照:眼眶两端收尖、中一横瞳孔。", "第三刀"))
w(card("H4", "八(第二刀)", g2.ba(15), "参照:两笔相背。", "第二刀"))
w(card("E1", "E1 一相圆", bf.E1_BODY, "入围参照。", "已在入围"))
w(card("N5", "N5 竹简", n5.V1, "入围参照。", "已在入围"))
w('<section class="band"><h2 class="band">口径</h2><p>红占包络=红像素 ÷ 符号包络面积'
'(84.3 × 84.07,512 栅格)。16px 实得行程=真栅格化到 16×16 后逐行红色行程取最大值。'
'对环类而言这个数的意义是「环与中心实还分不分得开」,不是「还剩几笔」。</p></section>')
w(ri.JS)
w('<footer>生成器 <code>ri2.py</code> · 前三刀见 <code>glyphs.html</code> / '
'<code>glyphs2.html</code> / <code>ri.html</code></footer></div></body></html>')
return "".join(P)
def main():
p = os.path.join(HERE, "ri2.html")
open(p, "w", encoding="utf-8").write(build())
print("ri2.html %s B" % f"{os.path.getsize(p):,}")
d = os.path.join(HERE, "assets-ri2")
os.makedirs(d, exist_ok=True)
for it in ITEMS:
body = it["body"]()
for kind, color in (("logo", INK), ("logo-white", WHITE)):
open(os.path.join(d, "%s-%s.svg" % (it["id"], kind)), "w", encoding="utf-8").write(
'<?xml version="1.0" encoding="UTF-8"?>\n<svg xmlns="http://www.w3.org/2000/svg" '
'viewBox="0 0 480 120" width="480" height="120" role="img" '
'aria-label="睿新致远 NOVALON">%s%s</svg>\n' % (body, n5.wordmark_fixed(color)))
open(os.path.join(d, "%s-mark.svg" % it["id"]), "w", encoding="utf-8").write(
'<?xml version="1.0" encoding="UTF-8"?>\n<svg xmlns="http://www.w3.org/2000/svg" '
'viewBox="0 0 108 120" width="108" height="120" role="img" '
'aria-label="睿新致远">%s</svg>\n' % body)
print("assets-ri2/ →", len(os.listdir(d)), "个文件")
if __name__ == "__main__":
main()