Repository navigation
Repair misnamed HC ExtraLight face; gate enforces canonical family names - #5
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 faceSource 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, andSource 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 toSource Han Sans HC ExtraLight. Idempotent; fails loudly if neither spelling is present.Makefile: the ExtraLight TTC rule applies the repair after unzip.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 ExtraLightrestored; the published v1.4 archive now FAILS the gate with exactly this defect. No other face in the archive is misnamed (full audit).