Skip to content

Repair misnamed HC ExtraLight face; gate enforces canonical family names - #5

Merged
ronaldtse merged 1 commit into
mainfrom
repair-hc-extralight-name
Nov 13, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
repair-hc-extralight-name

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Repair the misnamed Hong Kong face in Source Han Sans ExtraLight; gate enforces canonical family names

Found while running fontist/formulas#286's regression spec (which locks the full legacy name set) against the v1.4 archive: the Pal3love TrueType conversion of Source Han Sans 2.005 names the ExtraLight TTC's Hong Kong face SourceHanSansHC — concatenated, no weight — where every other weight TTC names the same face Source Han Sans HC ExtraLight. The face's own name ID 3 and postscript name (ID 6, SourceHanSansHC-ExtraLight) already carry the ExtraLight identity, so only name records 1 and 4 are botched upstream. Left unfixed, fontist indexes the face under a name no consumer looks up, and Source Han Sans HC ExtraLight — present in every release since v1.0 — goes missing.

The fix

  • test/repair_hc_extralight.py (fontTools, pinned in CI): after extraction, renames the broken face's name ID 1/4 records to Source Han Sans HC ExtraLight. Idempotent; fails loudly if neither spelling is present.
  • Makefile: the ExtraLight TTC rule applies the repair after unzip.
  • Gate (mn2pdf_compat.py) gains a new rule: every face's family must start with a canonical Source family stem ("Source Han Sans/Serif/Mono", "Source Sans/Serif Pro", "Source Code Pro") — a misnamed conversion artifact can never be published again.

Validated locally: the repaired archive passes the gate with Source Han Sans HC ExtraLight restored; the published v1.4 archive now FAILS the gate with exactly this defect. No other face in the archive is misnamed (full audit).

The Pal3love TrueType conversion of Source Han Sans 2.005 names the
ExtraLight TTC's Hong Kong face SourceHanSansHC - concatenated, no
weight - while every other weight TTC names it Source Han Sans HC
ExtraLight. The face's own unique ID and postscript name already carry
the ExtraLight identity, so only name records 1 and 4 are wrong
upstream. Repair them at build time (fontTools, pinned in CI) and make
the gate reject any face whose family does not start with a canonical
Source family stem, so a conversion artifact of this kind can never be
published again.

Verified: the repaired archive passes the gate with the face restored;
the published v1.4 archive fails it with exactly this defect. Full
audit: no other face in the archive is misnamed.
@ronaldtse
ronaldtse merged commit 1475769 into main Nov 13, 2026
5 checks passed
@ronaldtse
ronaldtse deleted the repair-hc-extralight-name branch November 14, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant