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

Add support for Google Fonts #28

Open
timkyoung opened this issue Apr 3, 2022 · 2 comments
Open

Add support for Google Fonts #28

timkyoung opened this issue Apr 3, 2022 · 2 comments

Comments

@timkyoung
Copy link

Google Fonts render correctly in the preview window, but fail to render when exporting, resulting in browser default faults instead. It would be great if the exports could render the fonts.

@hristoiankov
Copy link
Contributor

Does this pertain to the PDF export, PNG export, or both?

@hristoiankov
Copy link
Contributor

hristoiankov commented Jul 1, 2023

This might work. You could add the font link into the html in your card template:

If you are using a Google font and you have an error like this:

SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules

Then add crossorigin="anonymous" to your CSS link as below:

<link href="https://fonts.googleapis.com/css?family=Abril+Fatface&display=swap" rel="stylesheet" crossorigin="anonymous">

https://medium.com/mkdir-awesome/lessons-learned-from-converting-html-to-image-5bb93fdbd46f

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

No branches or pull requests

2 participants