Switch to STIX, Cambria, Noto and Dejavu for better support across platforms

This commit is contained in:
Johannes Marbach 2024-08-19 13:22:03 +02:00
parent eaaeb1de26
commit 06ee35b7c2
2 changed files with 9 additions and 10 deletions

View file

@ -42,16 +42,15 @@ $td-enable-google-fonts: false;
/* /*
* The $font-family-sans-serif definition here overrides the default value set by docsy * The $font-family-sans-serif definition here overrides the default value set by docsy
* (https://github.com/matrix-org/docsy/blob/66a4e61d2d34edc7196b9df83a7d09cd4af14b47/assets/scss/_variables.scss#L68) * (https://github.com/matrix-org/docsy/blob/66a4e61d2d34edc7196b9df83a7d09cd4af14b47/assets/scss/_variables.scss#L68)
* and:
*
* - Adds "Inter" to the front (making it the default)
* - Inserts "Arial Unicode MS" before "Arial" (because the former contains more mathematical glyphs)
*
* The Inter font itself is loaded via stylesheet links layouts/partials/hooks/head-end.html.
*/ */
$font-family-sans-serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, $font-family-sans-serif:
"Helvetica Neue", Arial Unicode MS, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", // Add "Inter" to the front, making it the default. The font itself is loaded via stylesheet
"Segoe UI Symbol"; // links in layouts/partials/hooks/head-end.html.
"Inter",
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
// Insert fonts suited for mathematical symbols on different platforms before "Arial"
"STIX Two Math", "Cambria Math", "Noto Sans Math", "Dejavu Sans",
Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
// Disable smooth scrolling as it makes TOC highlighting jump during the transition. // Disable smooth scrolling as it makes TOC highlighting jump during the transition.
$enable-smooth-scroll: false; $enable-smooth-scroll: false;

View file

@ -1 +1 @@
Prefer Arial Unicode MS over Arial for better support of mathematical symbols. Use dedicated fonts for better support of mathematical symbols.