Skip to content

Commit

Permalink
Update style.css to disable 'calt' feature for monospace
Browse files Browse the repository at this point in the history
Disable  the 'calt' font feature for monospaced fonts.
  • Loading branch information
cormullion authored Apr 10, 2024
1 parent bf9c763 commit b4940e0
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions docs/src/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,21 @@ https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/var
/* Code Snippet font */
--vp-font-family-mono: JuliaMono-Regular, monospace;

}

.mono {
/*
Disable contextual alternates (kind of like ligatures but different) in monospace,
which turns `/>` to an up arrow and `|>` (the Julia pipe symbol) to an up arrow as well.
This is pretty bad for Julia folks reading even though copy+paste retains the same text.
Disable the 'calt' (contextual alternates, often called ligatures) font feature
for monospaced text, which is usually enabled by default. This feature changes
the display of character combinations such "-" + ">", and "|" + ">". These can
be confusing for beginners, particularly if the font has 'unusual' designs.
*/
font-feature-settings: 'calt' 0;
}

.mono {

pre {
font-family: JuliaMono-Light;
}

;

code {
font-family: JuliaMono-Light;
}
Expand Down Expand Up @@ -198,4 +197,4 @@ mjx-container>svg {

:root:is(.dark) .light-only {
display: none;
}
}

0 comments on commit b4940e0

Please sign in to comment.