Skip to content

Conversation

@zerone0x
Copy link

Description

Fixes invalid font configuration in the dynamic OG image documentation. The example code for using Noto Sans fonts contained duplicate :wght@700 in the font property, which causes the Google Fonts API request to fail.

The loadGoogleFont function already appends :wght@${weight} to the font URL, so having :wght@700 in the font property creates an invalid URL like Noto+Sans:wght@700:wght@700.

Types of changes

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Documentation Update (if none of the other choices apply)
  • Others (any other types not listed above)

Checklist

  • I have read the Contributing Guide
  • I have added the necessary documentation (if appropriate)
  • Breaking Change (fix or feature that would cause existing functionality to not work as expected)

Further comments

Before this fix, users following the documentation would encounter errors when generating OG images with Noto Sans fonts because the Google Fonts API would return an error for the malformed URL.

Related Issue

Closes: #499


🤖 Generated with Claude Code

Remove duplicate `:wght@700` from font property in the Noto Sans font
configuration example. The weight is already passed separately to the
`loadGoogleFont` function, so having `:wght@700` in the font string
causes the generated URL to have a duplicate weight parameter like
`Noto+Sans:wght@700:wght@700`, which breaks the Google Fonts API request.

Fixes satnaing#499

Co-Authored-By: Claude <noreply@anthropic.com>
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.

[Docs]: Invalid specification for Noto Sans font

1 participant