DES-374: Typography parity — Figma atoms vs iOS composed styles#4
Merged
Conversation
…yles Olly added a Typography collection to the Lotus Figma file with atomic tokens (font-size/*, font-family/*, font-style/*, line-height/*). Previously the audit listed iOS typography under a "Figma has no Typography variables" warning — now it does real cross-platform parity. New scripts: - scripts/parse-ios-typography.mjs — extracts (name, family, size, weight) tuples from LotusTypography.swift, decomposing PostScript names like "NunitoSans-Bold" into family + weight. - scripts/typography-parity.mjs — decomposes each iOS composed style into atoms and checks each atom (size, family, weight) against the Figma token sets. Also reports the inverse: Figma sizes/families/ weights iOS doesn't use. build-report.mjs: - Removed the "Figma has no Typography variables" warning callout. - Removed the hardcoded iOS typography array — that data now comes from parse-ios-typography.mjs's output. - New Typography section: status summary, Figma token listing, per-iOS- style mismatch table with concrete issues (e.g. "size 23 not in Figma sizes" for h2PoppinsLight), and Figma-tokens-iOS-doesn't-use list. - TYPO_PARITY_JSON env var (default /tmp/typography-parity.json) for the input. Section degrades gracefully if missing. SKILL.md: - Pipeline mermaid diagram updated to show the two new scripts and the typography parity flow. - New Phase 2.5 (parse-ios-typography) and Phase 3.5 (typography-parity) sub-sections. - Phase 1 description bumped to mention 5 collections / ~160 vars including the atomic Typography collection. - "Future enhancements" updated: typography parity is now done at the atom level. Open follow-ups: line-height parity (iOS doesn't expose per-style line height) and composed text-style parity (if Figma adds composed text/* tokens later). Findings the new comparison surfaces (verified against the live file): - h2PoppinsLight: size 23 (Figma h2 = 24) and weight "Light" (Figma has no Light style). Two real bugs. - h2PoppinsBold uses SemiBold weight which isn't in Figma's set — intentional? Worth a Figma-side discussion. - sf*Font (System SF, 15pt) is iOS-only — intentional. - Figma defines "hero" (40pt) and "Medium" weight, neither used on iOS. Stacked on #3. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
🚨 gitStream Monthly Automation Limit Reached 🚨 Your organization has exceeded the number of pull requests allowed for automation with gitStream. To continue automating your PR workflows and unlock additional features, please contact LinearB. |
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.
Jira: DES-374 — Lotus Design System (Epic)
Stacked on: #3
Why
Olly added a
Typographycollection to the Lotus Figma file with atomic tokens (font-size/*,font-family/*,font-style/*,line-height/*). Previously the audit listed iOS typography under a "Figma has no Typography variables" warning — now it does real cross-platform parity.What it surfaces (verified against the live file)
h2PoppinsLightfont-size/h2= 24) and weightLight(Figma has no Light) — two real bugs in oneh2PoppinsBoldSemiBoldnot in Figma's set — intentional? Worth a Figma-side discussionsfSemiBoldFont,sfRegularFonthero(40pt)font-style/mediumOf 21 iOS composed styles, 17 are clean (all atoms in Figma's set), 4 mismatch.
What changed
SKILL.md— Pipeline mermaid diagram updated, new Phase 2.5 and Phase 3.5 sub-sections, "Future enhancements" trimmed (typography parity is now done at the atom level; line-height parity and composed-text-style parity are the remaining open follow-ups).Approach: atomic tokens, not composed text styles
Figma's typography is atomic — separate vars for size, family, weight, line-height. iOS has composed styles that bundle these. Comparison strategy:
(family, size, weight)atoms.This works without requiring Figma to maintain a separate composed-text-styles collection. If Figma later adds
text/h2-poppins-light-style composed tokens, we'd add a second comparison layer.Test plan
parse-ios-typography.mjscorrectly handlesFont.custom,UIFont(name:size:),Font.system(size:weight:), and.weight(.medium)chained modifiers (composite weight rendered asRegular+medium).typography-parity.mjscorrectly flags h2PoppinsLight as size+weight mismatch, h2PoppinsBold as weight-only mismatch, sf* as System (intentionally out of scope).Notes
LotusTypography.swiftdoesn't expose per-style line height; Figma definesline-height/*atoms — would need iOS-side change first) and composed text-style parity (if Figma adds composedtext/*tokens later).🤖 Generated with Claude Code