Skip to content

Fix broken font embed URLs#3

Open
tamasys wants to merge 1 commit into
sliday:mainfrom
tamasys:fix/generate-embed-semicolons
Open

Fix broken font embed URLs#3
tamasys wants to merge 1 commit into
sliday:mainfrom
tamasys:fix/generate-embed-semicolons

Conversation

@tamasys

@tamasys tamasys commented Jun 18, 2026

Copy link
Copy Markdown

Fixes #1

Description

Agents using the mcp tools generate broken Google Fonts embed URLs. The generated URLs use the css2 endpoint but provide axis values with commas (the old css API syntax) instead of semicolons.

Fix

Replaced commas with semicolons in hardcoded weight values, added validation and error messages for agents so they can recover from failure. Added parsing of italic weight variants.

…values

Google Fonts css2 endpoint requires semicolons between weight values
(e.g. wght@400;700), not commas (the old css API syntax).

Root cause: the defaults in generate_typography_system used comma-separated
weight strings. Fixed those defaults, plus added defensive .replace(',', ';')
in generate_embed for any callers that pass malformed input.
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.

Broken Google Fonts embed URLs

1 participant