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

Feature Request: Serve fonts locally #493

Open
nonvex opened this issue Jan 26, 2021 · 3 comments
Open

Feature Request: Serve fonts locally #493

nonvex opened this issue Jan 26, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@nonvex
Copy link

nonvex commented Jan 26, 2021

Would it be possible to bundle the fonts used in the framework locally as opposed to fetching them from Google Fonts? For many applications it is not possible to allow third party calls.

Thank you for your work.

@weaseldotro
Copy link
Contributor

I downloaded the fonts and replaced the paths in the carbon css file to point to local files instead of google fonts. Maybe you should also try this approach.

@jdoubleu
Copy link

jdoubleu commented Mar 6, 2021

I think this is a limitation imposed by the carbon design system package/components package itself, rather than specific for the svelte component framework.

The font url's are harcoded in the fonts/type .scss files.

In the meantime, you could try to download the fonts e.g. using the Google Webfont Helper from https://github.com/IBM/plex and override the @font-face definitions or simply replace the URLs, as @weaseldotro did.

@metonym
Copy link
Collaborator

metonym commented Dec 30, 2021

It should be possible to self host IBM Plex fonts when using SCSS. The Carbon monorepo has some documentation on self-hosting, but it should also be documented for the Svelte implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants