字形保真度

Glyph Fidelity 会审查经过转换的文本和排版边缘情况,帮助保留清晰一致的字形。

monikazapisek
2026年10月10日
1 收藏
467 下载

安装与下载

1 ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install glyph-fidelity

2 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/
工作区 {'/skills/'}

优先级:工作区 › 全局 › 内置

3 提示词安装

将此提示词复制到 Openclaw 即可自动安装。

请帮我使用 Clawhub 安装 skill-glyph-fidelity。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

更倾向于下载?

获取包含原生技能文件的ZIP压缩包。

下载技能 (.zip)

基本信息

名称 字形保真度
Slug glyph-fidelity
创建者 monikazapisek
创建时间 2026-10-10 05:32:28
更新时间 2026-10-10 05:32:28
收藏数 1
使用量 467
浏览量 7

安装指南

  1. ClawHub CLI 从源直接安装技能的最快方式。
    npx clawhub@latest install glyph-fidelity
  2. 手动安装 将技能文件夹复制到以下位置之一
    全局模式
    ~/.openclaw/skills/
    工作区
    /skills/
    优先级:工作区 > 本地 > 内置
  3. 提示词安装 将此提示词复制到 OpenClaw 即可自动安装。
    请帮我使用 Clawhub 安装 glyph-fidelity。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
    更倾向于下载?
    获取包含原生技能文件的ZIP压缩包。
    下载技能 (.zip)

什么是

Glyph Fidelity 是 Openclaw Skills 的一项设计工程技能,用于检查文本转换过程中可能出错的排版细节。它根据字体大小计算全大写文本的字母间距,标记负间距过小时发生的连字碰撞,并找出会破坏正文视觉纹理的行内首字母缩略词。它还会检查小型大写字母的使用情况,以及可能缺失字形或回退字体的问题。
这项技能旨在先报告审查结果,再提出问题;它会根据已有的文本和样式信息开展工作,在必要时说明假设,并在修改文件或 Figma 节点前征求许可。它补充而非取代更广泛的文本排版规则,让 Openclaw Skills 能够在 CSS 和 Figma 工作流程中进行有针对性的排版审查。

应用场景

检查看起来过于松散、过于紧凑或视觉上不均匀的大写标题或标签。
根据文本的字体大小计算全大写字母间距,而不是依赖猜测的数值。
检查负字母间距文本中是否存在
fi
、
fl
、
ffi
ffl
等组合的碰撞。
优化句式大小写正文中的行内首字母缩略词,例如
HTML
、
ZUS
USA
。
确认小型大写字母使用原生字体特性,而不是悄悄缩放普通大写字母。
审查包含非基本拉丁字符、排版标点或货币符号的文本,检查字体覆盖范围和回退字体不一致问题。
审查 CSS 或 Figma 排版,同时将基础字母间距方向的决定保留在相关的 text-typesetting 工作流程中。

工作原理

读取提供的文本和样式详情,包括字体大小、大小写转换、当前字母间距,以及任何可用的 Figma 或 CSS 上下文。
对全大写文本段,使用 TS = max(3%, min(12%, 160 / FS)) 计算字母间距,其中 FS 是以像素为单位的字体大小。报告输入字号和计算所得百分比。
检查是否需要小型大写字母,以及字体是否提供原生 OpenType 特性。如果没有,则说明限制,并询问是要模拟该样式还是省略它。
对低于 -2% 的字母间距,检查文本中容易形成连字的字符组合。如果存在碰撞风险,建议仅对受影响范围停用常见连字。
在句式大小写的正文中,查找连续三个或更多的大写字母。建议为每个符合条件的首字母缩略词单独设置 +5% 字母间距,并将字号设为比周围文本小 1px。
检查超出基本拉丁字符范围的字符是否存在字体覆盖风险。报告不可用字体,并区分 API 可检测的缺失字体与需要目视检查的字形回退情况。
展示发现的问题和修复建议。只询问无法确定且会影响结果的信息;写入文件或 Figma 节点前,必须征得明确许可。

配置指南

将 Glyph Fidelity 技能添加到 Openclaw Skills 兼容代理所使用的技能目录中,并保留其 SKILL.md 文件和 frontmatter。源文件未指定软件包管理器、安装命令或必需的配置值,因此不假设存在 CLI 安装命令。
向代理提供要审查的文本或设计上下文。为获得有用的审查结果,请提供以像素为单位的字号;检查现有样式时,请提供当前字母间距值;如果有相关 CSS 或 Figma 上下文,也请一并提供。检查字体覆盖范围时,请提供界面支持的语言。

此技能未指定 CLI 安装命令。

对于 Figma 工作流程,该技能可以读取相关文本属性和 OpenType 特性状态,但必须报告连字更改建议,由用户在 Type 设置面板中进行修改。它不会声称可以通过 Plugin API 应用该修复。

数据架构

该技能定义的是审查约定,而不是生成文件格式。其 frontmatter 用于标识技能,并说明其范围和触发条件:
字段 用途
name 技能标识符:glyph-fidelity
description 所涵盖排版边缘情况的摘要
triggers.use_when 适合进行审查的情况
triggers.do_not_use_for 由其他技能处理的相关排版决策
metadata.author Monika Zapisek
metadata.project Design Engineering Playbook
metadata.version 1.2.0
metadata.status accepted
审查输入:以像素为单位的字体大小、文本内容,以及审查现有样式时的当前字母间距。相关上下文可能包括目标语言、CSS 样式或 Figma 文本节点信息。
报告结果:计算所得的全大写字母间距;连字碰撞风险及受影响范围;行内首字母缩略词子范围建议;原生小型大写字母的可用性;以及缺失字体或字形回退的视觉问题。该技能未指定生成输出文件或持久化数据存储。

高级特性

使用连续的全大写字母间距公式,最小值为 3% ,最大值为 12% ;字体粗细修正因子属于相关的 text-typesetting 工作流程,并在之后应用。
提供全大写和小型大写字母的 CSS 指引,包括在指定范围内使用
font-variant-caps: small-caps
font-variant-ligatures: no-common-ligatures
。
支持面向 Figma 的检查,包括读取文本大小写和 OpenType 特性;建议中已考虑 Plugin API 缺少 OpenType 特性设置器这一限制。
将连字修复限制在触发碰撞检查的范围内,而不是在整个混合样式文本节点中停用连字。
区分 API 可检测的缺失字体状态与需要通过视觉截图检查的单个回退字形。
遵循优先审查并尊重同意的工作流程:先读取并报告,再提出问题;不会因无法获得答案而停滞;写入文件或 Figma 节点前必须获得许可。


name: glyph-fidelity description: Use when checking that letterform-level detail survives a transform — all-caps tracking by a continuous formula, ligature collisions under negative tracking, and inline acronyms needing their own subrange treatment to keep paragraph color even. triggers: use_when: - user applies or reviews an ALL CAPS text transform - user asks about ligatures breaking under tight tracking - user asks how to handle an acronym (HTML, ZUS, USA) inside running prose - user asks why a heading "looks wrong" after transforming to uppercase do_not_use_for: - the base tracking direction/size rules for a text style (see text-typesetting Step 2 — this skill refines edge cases on top of it) - number figure styles (see text-typesetting Step 4) - hanging punctuation / dash rendering (see microtypography Rule 1c/4, text-typesetting Step 6/7) metadata: author: Monika Zapisek project: Design Engineering Playbook version: "1.2.0" status: accepted

Glyph Fidelity

Purpose

Protect letterform structure from the failure modes a naive tracking/case transform introduces — under- or over-tracked all-caps text, ligatures that collapse into illegible blobs under negative tracking, inline acronyms that break the paragraph's even visual "color" (texture) — and from glyphs that silently come from another font.

When To Use

Any time text is transformed to all caps (CSS text-transform: uppercase, Figma textCase: "UPPER"), to compute the correct tracking rather than a guessed round number.
Reviewing a heading or label where letters look like they're touching or merging.
Text containing acronyms (3+ consecutive capital letters) inside otherwise sentence-case prose.

When NOT to use

This isn't the primary tracking-direction logic — text-typesetting Step 2 (Branch A/B) decides whether tracking is positive or negative. This skill holds the all-caps formula that Branch A uses and covers the structural side-effects (ligatures, acronym color) that Step 2 doesn't address.

Inputs

font-size (px).
The text content itself (to detect ligature-prone letter pairs and inline acronyms).
Current tracking value, if reviewing an existing style.

Outputs

A precise tracking percentage for all-caps runs (continuous formula, not a banded guess).
Flags for any ligature collision risk, with the fix (disable standard ligatures for that range).
Flags for inline acronyms, with the subrange fix (own tracking + size adjustment).

Questions

This skill is an audit, not an interview. Work in this order: read what the file or the input already says, report, then ask.

Ask only when a value can't be read and the answer would change the result. One question at a time.
Don't ask for anything the request already states or the file shows — say what you took and where it came from.

If the question can't be answered, state the assumption and carry on. Never stall the report on it.

Always ask before writing to a file or a Figma node.

Questions this skill may need:

Whether to simulate small caps or drop them, when the font has no small-caps feature (Rule 2).

Workflow

Rule 1 — All-caps tracking (continuous formula)

For any text-run transformed to uppercase, tracking (TS) is a function of font-size (FS, in px), not a fixed band:

TS = max(3%, min(12%, 160 / FS))

Reference values: 10px → +12%, 14px → +11.4%, 16px → +10%, 20px → +8%, 32px → +5%, 40px → +4%, 54px and above → +3%. The 12% cap keeps very small text from spreading apart. The 3% floor is there because all-caps text never goes to zero or negative tracking; large display headings (FS > 32px) land between +3% and +5% on their own.

This is the same formula text-typesetting Step 2 Branch A uses. There is one source for all-caps tracking, so both skills return the same number for the same size. The font-weight modifier (text-typesetting Step 2c) is applied to the result afterwards. In Figma, write it as letterSpacing = { unit: "PERCENT", value: TS }.

Rule 2 — Small caps: never fake it

If Small Caps styling is required, never simulate it by shrinking the base font (fontSize × 0.8) and capitalizing — this produces thin, spindly letterforms with the wrong stroke weight relative to true small caps, which are drawn by the type designer at the correct weight. Check for and use the native OpenType feature instead:

CSS: font-variant-caps: small-caps; (or all-small-caps if lowercase-context is needed too).
Figma: textNode.textCase = "SMALL_CAPS".

If the font doesn't expose small caps at all, say so explicitly and let the user decide between a real (but imperfect) simulation and dropping the request — don't silently fake it either way.

Rule 3 — Ligature collision under negative tracking

Negative tracking (TS < -2%, per text-typesetting Step 2 Branch B at large sizes) pulls letters closer together. Built-in ligatures (fi, fl, ffi, ffl) are pre-drawn as fused glyphs — at sufficiently negative tracking, the already-fused shape can start visually colliding with its neighbors, reading as a blob rather than two/three distinct letters.

Trigger: tracking value more negative than -2% on a text containing ligature-prone pairs.
Fix: disable standard ligatures for that specific range rather than reducing the tracking further (reducing tracking would undo the heading-tightening text-typesetting was asked to do).
CSS: font-variant-ligatures: no-common-ligatures; on the affected range.
Figma: ligatures are the LIGA OpenType feature. textNode.getRangeOpenTypeFeatures(start, end) reads its state, but the Plugin API has no setter for OpenType features. Report the affected range and ask the user to switch ligatures off for it in the Type settings panel (Details tab). Don't report the fix as applied.
Only disable ligatures on the specific range that triggered the check — don't disable ligatures globally across a node that also contains normally-tracked text.
Rule 4 — Inline acronyms break paragraph color

A run of 3+ consecutive capital letters (HTML, ZUS, USA) inside otherwise sentence-case prose reads visually heavier and denser than the surrounding lowercase text — it creates a dark "spot" that breaks the paragraph's even visual texture (what Bringhurst calls color).

Trigger: any inline run of ≥3 consecutive uppercase letters within sentence-case body text.
Fix: isolate the acronym into its own subrange and apply:
Tracking: +5% on that subrange only.
Font-size: reduce by 1px relative to the surrounding body text (a small optical correction — full-size acronyms read as shouting relative to the lowercase around them).
Don't apply this to acronyms already styled as small caps or already in an all-caps heading (Rule 1 already governs those) — this rule is specifically for inline mixed-case contexts.
Rule 5 — Missing glyphs

When a font has no glyph for a character, software either shows an empty box ("tofu") or silently takes the character from a fallback font. In an interface the second case is the common one and the harder to spot: a few letters in a word come from a different typeface, slightly off in weight, width or height.

Trigger: text containing characters beyond basic Latin — Polish letters (ą ć ę ł ń ó ś ź ż and their capitals), typographic quotes („ ” “), dashes (– —), ×, currency signs — set in a font that may not cover them. Check every language the interface ships in, not only the one in the mockup.
Fix: choose a font or a font style that covers the language. Don't replace the characters with look-alikes.
Figma: textNode.hasMissingFont tells you that the whole font is unavailable to the document — report that first, since nothing else about the node can be trusted until it's resolved. A single glyph taken from a fallback font can't be read from the Plugin API: check a screenshot of the node for letters that differ from their neighbours, and say that the check was visual.

Quality Checklist

All-caps tracking computed from the formula and stated with the input font-size shown — the same value text-typesetting Branch A gives for that size.
Small caps verified as a native OpenType feature before use; simulated small caps only used with explicit user awareness.
Ligature collision checked whenever tracking is more negative than -2%; fix disables ligatures on the affected range only, doesn't further reduce tracking. In Figma it is reported as a step for the user, not applied by script.
Inline acronyms (3+ caps) in sentence-case prose isolated into a subrange with +5% tracking and -1px size, not left at body-text default.
Characters beyond basic Latin checked for coverage in every shipping language; hasMissingFont reported; glyph fallback checked visually and labelled as such.
Figma writes (if any) only applied on explicit request.

References

Bringhurst, R. (2012). The Elements of Typographic Style (4th ed.). Hartley & Marks — even paragraph "color" (visual texture) as a compositor's goal; acronyms and all-caps runs as color-breaking outliers requiring correction.
Felici, J. (2003). The Complete Manual of Typography. Adobe Press — ligature behavior under tight tracking; true small caps vs. faked/scaled capitals.
Google Fonts Knowledge, "Tofu" and "Language support in fonts" — a missing character shows as tofu when no fallback is available; it should be avoided at all costs.
OpenType registered features: liga (standard ligatures), smcp/c2sc (small caps).
Figma Plugin API Docs: TextNode.textCase, TextNode.setRangeLetterSpacing, TextNode.setRangeFontSize, TextNode.getRangeOpenTypeFeatures (read-only).
Related skills: text-typesetting (base tracking direction/size — this skill refines edge cases on top of it), microtypography (character-level text rules independent of a design tool).
Frihet ERP 运营契约
Posterly 社交媒体发布