Skip to content

Fix rendering of font in ogimage #3299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

SamyPesse
Copy link
Member

@SamyPesse SamyPesse commented Jun 11, 2025

This PR fixes incorrect font being loaded as were not caching based on the input text (sometimes loading a cyrilic font for a latin text, etc).
It improves it by introducing a built package @gitbook/fonts with our own mapping of fonts instead of doing HTTP requests to Google Fonts all the time.

Copy link

linear bot commented Jun 11, 2025

Copy link

changeset-bot bot commented Jun 11, 2025

🦋 Changeset detected

Latest commit: 9460e7a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@gitbook/fonts Minor
gitbook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

argos-ci bot commented Jun 11, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v1 (Inspect) ✅ No changes detected - Jun 11, 2025, 11:27 AM
customers-v2 (Inspect) 👍 Changes approved 77 changed Jun 11, 2025, 11:26 AM
default (Inspect) ✅ No changes detected - Jun 11, 2025, 11:29 AM
v2-cloudflare (Inspect) ✅ No changes detected - Jun 11, 2025, 11:27 AM
v2-vercel (Inspect) ✅ No changes detected - Jun 11, 2025, 11:29 AM

@SamyPesse SamyPesse marked this pull request as ready for review June 11, 2025 11:07
@SamyPesse SamyPesse merged commit fbfcca5 into main Jun 11, 2025
21 checks passed
@SamyPesse SamyPesse deleted the samy/rnd-7273-random-bold-letters-in-preview-images-for-docs-sites branch June 11, 2025 11:41
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.

2 participants