Skip to content

Commit 1b5b2a7

Browse files
authored
docs: add Consolas font and prioritize resource loading (#16225)
1 parent 1c388fb commit 1b5b2a7

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

docs/src/_includes/layouts/base.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
<link rel="preload" href="{{ '/assets/fonts/SpaceGrotesk-Medium-subset.woff2' | url }}" as="font" type="font/woff2" crossorigin>
6262
<link rel="preload" href="{{ '/assets/fonts/Inter-Regular-subset.woff2' | url }}" as="font" type="font/woff2" crossorigin>
6363
<link rel="preload" href="{{ '/assets/fonts/SpaceMono-Regular-subset.woff2' | url }}" as="font" type="font/woff2" crossorigin>
64+
<link rel="preload" href="{{ '/assets/fonts/Consolas.woff' | url }}" as="font" type="font/woff" crossorigin>
65+
<link rel="preconnect" href="https://www.googletagmanager.com/">
6466

6567
<script>
6668
(function () {
@@ -74,6 +76,16 @@
7476

7577

7678
<style>
79+
80+
/* Overrides for funky punctuators */
81+
@font-face {
82+
font-family: "Mono Punctuators";
83+
src: url("{{ '/assets/fonts/Consolas.woff' | url }}") format("woff");
84+
font-weight: 400;
85+
unicode-range: U+40, U+7B, U+7D, U+28, U+29;
86+
font-display: swap;
87+
}
88+
7789
/* Space Grotesk for headings */
7890
@font-face {
7991
font-family: "Space Grotesk";
195 KB
Binary file not shown.

docs/src/assets/scss/syntax-highlighter.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pre[class*="language-"] {
1212
word-break: normal;
1313
word-wrap: normal;
1414
line-height: 1.5;
15+
font-variant-ligatures: none;
1516

1617
-moz-tab-size: 4;
1718
-o-tab-size: 4;

docs/src/assets/scss/tokens/typography.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
}
5454

5555
:root {
56-
--mono-font: "Space Mono", monospace;
56+
--mono-font: "Mono Punctuators", "Space Mono", monospace;
5757
--text-font: "Inter",
5858
-apple-system,
5959
BlinkMacSystemFont,

0 commit comments

Comments
 (0)