Skip to content

Use Google Fonts' "text" parameter to limit the font characters to fetch #135

@asger-finding

Description

@asger-finding

The text images are excessively large since all characters in the font are loaded. By including a text url parameter, detailing what characters are used, the google font can be scaled down in size significantly.

For example, https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&text=fo will only deliver the f and o characters, which can spell out foo, but not bar nor Foo.
It'd be neat if this was automated on the back-end of course.

It should be noted that I managed to reduce the file size of my readme-typing from 150kb to 5kb.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions