Skip to content
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

docs: add best practice for fonts persistence #638

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

Jackie1210
Copy link
Contributor

@Jackie1210 Jackie1210 commented Oct 4, 2024

@jakeinflab made great investigation, check here. If we can follow best practices, we don't need to use hashid + Map. What do you think? @shuding

@Jackie1210 Jackie1210 requested a review from shuding as a code owner October 4, 2024 16:30
Copy link

vercel bot commented Oct 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
satori-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 6, 2024 2:23am

@@ -317,6 +317,11 @@ await satori(

Multiple fonts can be passed to Satori and used in `fontFamily`.

> [!TIP]
> We recommend you define global fonts instead of creating a new object and pass it to satori for better performace, if your fonts do not change. [Read it for more detail](https://github.com/vercel/satori/issues/590)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> We recommend you define global fonts instead of creating a new object and pass it to satori for better performace, if your fonts do not change. [Read it for more detail](https://github.com/vercel/satori/issues/590)
> We recommend defining fonts on the global level, instead of creating a new object and pass it to Satori on each generation. This generally improves the performance. More details can be found on [this issue](https://github.com/vercel/satori/issues/590).

@shuding shuding merged commit f7b0254 into vercel:main Oct 6, 2024
9 checks passed
@shuding
Copy link
Member

shuding commented Oct 6, 2024

Thanks a lot @Jackie1210!

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