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

Google Font support #5701

Open
mrleblanc101 opened this issue Aug 8, 2024 · 1 comment
Open

Google Font support #5701

mrleblanc101 opened this issue Aug 8, 2024 · 1 comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@mrleblanc101
Copy link

mrleblanc101 commented Aug 8, 2024

Description

I use this config:

{
    theme: 'dark',
    fontFamily: 'Inter',
}

I see font-familly: Inter;, but when I inspect the rendered font is Times.
I know that Inter is loaded and works and this is the font that is displayed on the rest of my website.

Steps to reproduce

  1. Add a Google font following Google recommandations:
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:slnt,wght@-10..0,100..900&display=swap" rel="stylesheet">
  1. Configurer mermaid with this config:é
{
    theme: 'dark',
    fontFamily: 'Inter',
}
  1. Inspect the page

Screenshots

Screenshot 2024-08-08 at 2 01 08 PM
Screenshot 2024-08-08 at 2 02 08 PM

Code Sample

No response

Setup

  • Mermaid version: 10.9.1
  • Browser and Version: Chrome

Suggested Solutions

No response

Additional Context

No response

@mrleblanc101 mrleblanc101 added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Aug 8, 2024
@mrleblanc101
Copy link
Author

If I use a build-in font instead of a Google font like monospace, it works:
Screenshot 2024-08-08 at 2 03 31 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

1 participant