Skip to content

fix: resolve font family names with surrounding whitespace to the declared font#120

Merged
dazzatronus merged 1 commit into
mainfrom
derk/eng-652-studio-delegate-parser
Jun 3, 2026
Merged

fix: resolve font family names with surrounding whitespace to the declared font#120
dazzatronus merged 1 commit into
mainfrom
derk/eng-652-studio-delegate-parser

Conversation

@dazzatronus

@dazzatronus dazzatronus commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Studio's parseFontFamily now delegates to the shared @shotstack/shotstack-canvas parser (bumped to ^2.9.0), so a family name is split consistently wherever it is used.

Behaviour change: a font.family with leading/trailing whitespace — common from CMS fields and {{merge}} variables — now resolves to the declared font instead of a fallback. Every diverging input moves toward the declared intent; none regresses.

Changes

  • Bump @shotstack/shotstack-canvas^2.9.0.
  • font-config.ts: parseFontFamily delegates to the shared parser; keeps the {baseFontFamily, fontWeight} return shape so call sites are untouched.

Validation

26-input old-vs-new equivalence (clean inputs identical; whitespace/null inputs now resolve instead of falling through); tsc --noEmit clean; 1791 tests pass. parseFontFamily is not part of the public API.

@dazzatronus dazzatronus force-pushed the derk/eng-652-studio-delegate-parser branch from 529bd4e to cae4842 Compare June 3, 2026 11:17
@dazzatronus dazzatronus changed the title refactor: delegate parseFontFamily to shotstack-canvas 2.9.0 (ENG-652) fix: trim font family whitespace by delegating the parser to shotstack-canvas 2.9.0 (ENG-652) Jun 3, 2026
@dazzatronus dazzatronus changed the title fix: trim font family whitespace by delegating the parser to shotstack-canvas 2.9.0 (ENG-652) fix: trim font family whitespace by delegating the parser to shotstack-canvas 2.9.0 Jun 3, 2026
@dazzatronus dazzatronus self-assigned this Jun 3, 2026
@dazzatronus dazzatronus force-pushed the derk/eng-652-studio-delegate-parser branch from cae4842 to 264c520 Compare June 3, 2026 11:25
@dazzatronus dazzatronus changed the title fix: trim font family whitespace by delegating the parser to shotstack-canvas 2.9.0 fix: resolve font family names with surrounding whitespace to the declared font Jun 3, 2026
@dazzatronus dazzatronus merged commit 7da0adf into main Jun 3, 2026
1 check passed
@dazzatronus dazzatronus deleted the derk/eng-652-studio-delegate-parser branch June 3, 2026 11:35
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.11.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant