Skip to content

Incorrect guide for accessing font programatically through Fonts API #13635

@3x10RaiseTo8

Description

@3x10RaiseTo8

📚 Subject area/topic

Fonts API

📋 Page(s) affected (or suggested, for new content)

https://docs.astro.build/en/guides/fonts/#accessing-font-data-programmatically

📋 Description of content that is out-of-date or incorrect

context.url.origin will resolve to the Astro.site string in astro build production mode. Meaning the font already has to be deployed for this fetch to work. Fix could be to use readfile and stuff rather than involving urls.

Also, it is useful to mention that satori doesn't use woff2 format.

This particular guide is very useful but it has to be bug free and descriptive. Almost everyone wants og image for their blog so that it looks more personalised when shared on the internet.

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    improve or update documentationEnhance / update existing documentation (e.g. add example, improve description, update for changes)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions