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

Please allow changing the font. #5985

Open
Tylersuard opened this issue Oct 21, 2024 · 1 comment
Open

Please allow changing the font. #5985

Tylersuard opened this issue Oct 21, 2024 · 1 comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@Tylersuard
Copy link

Proposal

I can make a diagram with beautiful colors, but it will sometimes still look ugly because of the font. It would be amazing if we could change the font.

Example

style HS fill:#009688, stroke:#00796B, stroke-width:2px; font-family:courier;

Screenshots

No response

@Tylersuard Tylersuard added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Oct 21, 2024
@AlGuil
Copy link

AlGuil commented Oct 22, 2024

You can change the font by adding an "init" bloc before your diagram and modifying the "themeVariables".
If you want to know all the parameters that you can modify, I invite you to read this page of the doc : theme-variables

Exemple

Here is a flowchart with only one block and the font has been changed to 'Comic Sans MS'

%%{init: {
'themeVariables': {
'fontFamily': 'Comic Sans MS'
}
}}%%
flowchart TD
A[Hello World!]

%%{init: {
    'themeVariables': {
        'fontFamily': 'Comic Sans MS'
    }
}}%%
flowchart TD
    A[Hello World!]
Loading

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: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants