Skip to content

Replace Google Fonts with Fontsource import to improve Keystatic CMS performance, enable offline usage, and improve user privacy #1452

@Greenheart

Description

@Greenheart

Hi!

First of all, thanks for creating such a useful and polished Git-based CMS!

Proposal

Consider replacing Google Fonts with https://github.com/fontsource/fontsource and install their npm modules to bundle fonts together with the code and completely remove the need for sending requests to Google Fonts. This would enable offline usage of Keystatic CMS in scenarios where the Google font has not yet been cached, improve performance for all users (especially with slow network conditions) and improve privacy by not letting Google track font requests.

Fontsource has been a big improvement in most of my projects in the past years, and I strongly recommend Keystatic to load fonts using this method as well:
https://fontsource.org/docs/getting-started/introduction

There are currently three code locations that would need to be updated
https://github.com/search?q=repo%3AThinkmill%2Fkeystatic%20fonts.google&type=code

It would make sense to solve #1292 at the same time as switching the loading strategy of the fonts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions