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 个文本/矢量件。
169 lines
8.8 KiB
Python
169 lines
8.8 KiB
Python
#!/usr/bin/env python3
|
||
# -*- coding: utf-8 -*-
|
||
"""
|
||
重量批:十七刀第一次动"尺寸"这个轴
|
||
|
||
两族调研(战略咨询 12 家 / 科技巨头 18 家)回来的结论很硬:
|
||
· 国际 12 家咨询公司里,基本形 >4 的:**0 家**;McKinsey/BCG/Kearney/Booz Allen
|
||
干脆**没有符号**,把全部质量押在字距、笔画粗细和一处平涂色上。
|
||
· 科技巨头里超过 4 原语的只有 Cisco(9 条)。
|
||
· 德勤的明文规则:绿点 = x 高,**绝不重于字标**。
|
||
· IBM 的规则:16px 里**不保留任何间距小于笔画宽的结构**(为此出 8/13 条两版)。
|
||
· 元素多 + 叙事密的样本是和君、北大纵横——**恰好是我十七刀一直在做的那一类**。
|
||
|
||
所以我这轮不换形状,只换**重量**:同一个 trivial primitive,
|
||
从"字标块高的 20%"一路推到 72%,让"符号该多重"这件事变成看得见的梯度。
|
||
"""
|
||
import importlib.util
|
||
import math
|
||
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"))
|
||
RED, INK, WHITE = n5.RED, n5.INK, n5.WHITE
|
||
ENV_X, ENV_W = n5.ENV_X, n5.ENV_W
|
||
BCY = n5.BLOCK_CY
|
||
CX = ENV_X + ENV_W / 2
|
||
BLOCK_H = n5.BLOCK_H
|
||
PX16 = 16.0 / ENV_W
|
||
|
||
# 符号块中心:让它贴着字标,而不是占满包络
|
||
LEFT_EDGE = ENV_X
|
||
GAP_TO_TEXT = 14.0 # 符号右缘到书法字标左缘的净空
|
||
|
||
|
||
def rect(cx, cy, w, h, col=RED):
|
||
x0, y0, x1, y1 = cx - w / 2.0, cy - h / 2.0, cx + w / 2.0, cy + h / 2.0
|
||
return '<path d="M %g %g L %g %g L %g %g L %g %g Z" fill="%s"/>' % (
|
||
x0, y0, x1, y0, x1, y1, x0, y1, col)
|
||
|
||
|
||
def cut_square(cx, cy, s, leg, col=RED):
|
||
h = s / 2.0
|
||
pts = [(cx - h, cy - h), (cx + h - leg, cy - h), (cx + h, cy - h + leg),
|
||
(cx + h, cy + h), (cx - h, cy + h)]
|
||
return '<path d="M %s Z" fill="%s"/>' % (" L ".join("%g %g" % p for p in pts), col)
|
||
|
||
|
||
def dot(cx, cy, r, col=RED):
|
||
return '<circle cx="%g" cy="%g" r="%g" fill="%s"/>' % (cx, cy, r, col)
|
||
|
||
|
||
def sq(frac):
|
||
"""边长 = 字标块高 × frac 的实心方块,垂直居中,左缘贴包络左边。"""
|
||
s = frac * BLOCK_H
|
||
return lambda: rect(LEFT_EDGE + s / 2.0, BCY, s, s)
|
||
|
||
|
||
def cut(frac, legfrac=0.28):
|
||
s = frac * BLOCK_H
|
||
return lambda: cut_square(LEFT_EDGE + s / 2.0, BCY, s, legfrac * s)
|
||
|
||
|
||
def xheight_dot():
|
||
"""德勤那一步:点 = NOVALON 的 x 高(font-size 14 的 Georgia,x 高约 0.48em)。"""
|
||
r = 14 * 0.48 / 2.0
|
||
return lambda: dot(LEFT_EDGE + r, BCY + 22.0, r)
|
||
|
||
|
||
CASES = [
|
||
dict(id="G00", nm="无符号", figs=0, frac=0.0, body=lambda: "",
|
||
why="品类里多数答案就是这个:McKinsey/BCG/Kearney/Booz Allen/Oracle/Intel/Uber "
|
||
"都没有符号。放这一行是为了让「不要符号」成为一个看得见的选项。"),
|
||
dict(id="G0", nm="德勤式一点", figs=1, frac=None, body=xheight_dot(),
|
||
why="点 = NOVALON 的 x 高(约 6.7 单位)。这是调研里唯一被写成明文规则的重量上限:"),
|
||
dict(id="G1", nm="方块 · 20% 块高", figs=1, frac=.20, body=sq(.20)),
|
||
dict(id="G2", nm="方块 · 30%", figs=1, frac=.30, body=sq(.30)),
|
||
dict(id="G3", nm="方块 · 40%", figs=1, frac=.40, body=sq(.40)),
|
||
dict(id="G4", nm="方块 · 55%", figs=1, frac=.55, body=sq(.55)),
|
||
dict(id="G5", nm="方块 · 72%(我前十七刀的量级)", figs=1, frac=.72, body=sq(.72)),
|
||
dict(id="G6", nm="斜切方 · 40%", figs=1, frac=.40, body=cut(.40),
|
||
why="同一个量级上加一处 45° 切角——切角是它唯一的动作。"),
|
||
]
|
||
for c in CASES:
|
||
if c.get("frac"):
|
||
c.setdefault("why", "只改重量,不改形状:边长 = 字标块高的 %d%%。" % round(c["frac"] * 100))
|
||
else:
|
||
c.setdefault("why", "")
|
||
CASES[1]["why"] += "「符号绝不重于字标」。"
|
||
|
||
|
||
|
||
pr = load("pr", os.path.join(HERE, "primitives.py"))
|
||
|
||
|
||
def build():
|
||
P = ['<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8">'
|
||
'<title>重量批 · 十七刀第一次动尺寸这个轴</title><style>' + pr.CSS + '</style></head><body><div class="wrap">']
|
||
P.append('<div class="ey">Weight cut · 2026-10-13 · 评审稿(repo 零改动)</div>')
|
||
P.append('<h1>重量批:<em>十七刀第一次动「尺寸」这个轴</em></h1>')
|
||
P.append('<p class="lede">三族调研(战略咨询 12 家/科技巨头 18 家/开发者与 AI 公司 20 家)'
|
||
'回来后的结论比预期硬,而且它指向我从没动过的一个变量:不是形状,是<b>重量</b>。'
|
||
'所以这一批不换形状,只把同一个 trivial primitive 从字标块高的 20% 推到 72%。</p>')
|
||
P.append('<div class="note"><b>三族一致的事实。</b>'
|
||
'战略咨询国际 12 家里基本形 >4 的:<b>0 家</b>,其中 McKinsey/BCG/Kearney/Booz Allen '
|
||
'<b>干脆没有符号</b>。科技巨头 18 家里超过 4 原语的只有 Cisco(9 条)。开发者与 AI 公司 20 家'
|
||
'<b>中位数 2 个原语</b>,最佳组是「1 原语 + 锁死角度与半径比」——Vercel 全标只有 3 条指令、'
|
||
'OpenAI 是 60° 旋转对称、GitLab 只用一个 22.3° 角。</div>')
|
||
P.append('<div class="note"><b>三条被写成明文规则的硬约束,我十七刀一条都没守。</b>'
|
||
'① 德勤:绿点 = x 高,<b>符号绝不重于字标</b>——我的符号一直占到包络的 87% 高。'
|
||
'② IBM:16px 里<b>不保留任何间距小于笔画宽的结构</b>(为此专门出 8 条/13 条两版)。'
|
||
'③ 实测:弧半径种类 ≤2、全 fill 无描边、<b>符号内不放叙事细节</b>。'
|
||
'而元素多、叙事密的那两个样本是和君与北大纵横——恰好是我一直在做的那一类。</div>')
|
||
|
||
for c in CASES:
|
||
body = c["body"]()
|
||
P.append('<div class="card"><div class="hd"><span class="id">%s</span>%s'
|
||
'<span class="k">%d 个基本形</span></div>' % (c["id"], c["nm"], c["figs"]))
|
||
P.append('<div class="row">')
|
||
P.append('<div class="u">%s<span>主标识 88px</span></div>' % pr.lockup(body, 88))
|
||
P.append('<div class="u">%s<span>40px header</span></div>' % pr.lockup(body, 40))
|
||
P.append('<div class="u">%s<span>32px 移动</span></div>' % pr.lockup(body, 32))
|
||
P.append('<div class="u"><span class="dk">%s</span><span>深底 40px</span></div>'
|
||
% pr.lockup(body, 40, WHITE))
|
||
for px in (48, 32, 16):
|
||
P.append('<div class="u">%s<span>%dpx</span></div>' % (pr.only(body, px), px))
|
||
P.append('</div><div class="small">%s</div></div>' % c["why"])
|
||
P.append('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 108 120" '
|
||
'style="position:absolute;width:0;height:0" data-k="%s">%s</svg>' % (c["id"], body))
|
||
|
||
P.append('<h2>重量梯度(实测)</h2><table><thead><tr><th>候选</th><th>边长/块高</th>'
|
||
'<th>最细特征@16</th><th>墨率@16</th><th>墨率@512</th><th>缩放漂移</th>'
|
||
'<th>是否重于字标</th></tr></thead><tbody>')
|
||
for c in CASES:
|
||
f = c.get("frac")
|
||
lab = ("%d%%" % round(f * 100)) if f else ("x 高 ≈8%" if c["id"] == "G0" else "—")
|
||
heavy = ("是" if f and f >= 0.55 else "否") if f else ("否" if c["id"] == "G0" else "—")
|
||
P.append('<tr><td><b>%s %s</b></td><td class="n">%s</td>'
|
||
'<td class="n" data-cell="%s@minrun">…</td>'
|
||
'<td class="n" data-cell="%s@ink16">…</td><td class="n" data-cell="%s@ink512">…</td>'
|
||
'<td class="n" data-cell="%s@drift">…</td><td class="n">%s</td></tr>'
|
||
% (c["id"], c["nm"], lab, c["id"], c["id"], c["id"], c["id"], heavy))
|
||
P.append('</tbody></table>')
|
||
P.append('<p class="small">「重于字标」按调研那条明文规则判:符号高度超过字标块高的一半即算重。'
|
||
'G0 是德勤写死的那个量级(NOVALON 14 单位字号的 x 高 ≈ 6.7 单位 ≈ 块高的 8%)。</p>')
|
||
|
||
P.append('<h2>16×16 栅格</h2><div class="grids" style="grid-template-columns:repeat(4,1fr)">')
|
||
for c in CASES:
|
||
P.append('<div><pre data-g="%s">…</pre><i>%s</i></div>' % (c["id"], c["id"]))
|
||
P.append('</div><p class="small">G00 无符号,栅格应为全白——它是这个实验的负对照。</p>')
|
||
P.append(pr.JS)
|
||
P.append('<footer>生成器 <code>weight.py</code> · 评分台复用 <code>primitives.py</code> · '
|
||
'三族调研结论见本页上方两块说明</footer></div></body></html>')
|
||
return "".join(P)
|
||
|
||
|
||
if __name__ == "__main__":
|
||
p = os.path.join(HERE, "weight.html")
|
||
open(p, "w", encoding="utf-8").write(build())
|
||
print("weight.html %s B" % f"{os.path.getsize(p):,}")
|