|
7 | 7 |
|
8 | 8 | @font-face { |
9 | 9 | font-family: "JetBrains Mono"; |
10 | | - src: url('fonts/JetBrainsMono-Regular.woff2'); |
11 | 10 | font-weight: 400; |
12 | 11 | font-style: normal; |
| 12 | + font-display: swap; |
| 13 | + src: url("fonts/JetBrainsMono-Regular.woff2"); |
13 | 14 | } |
14 | 15 | @font-face { |
15 | 16 | font-family: "JetBrains Mono"; |
16 | | - src: url('fonts/JetBrainsMono-Medium.woff2'); |
17 | 17 | font-weight: 600; |
18 | 18 | font-style: normal; |
| 19 | + font-display: swap; |
| 20 | + src: url("fonts/JetBrainsMono-Medium.woff2"); |
19 | 21 | } |
20 | 22 | @font-face { |
21 | 23 | font-family: "JetBrains Mono"; |
22 | | - src: url('fonts/JetBrainsMono-Bold.woff2'); |
23 | 24 | font-weight: 700; |
24 | 25 | font-style: normal; |
| 26 | + font-display: swap; |
| 27 | + src: url("fonts/JetBrainsMono-Bold.woff2"); |
| 28 | +} |
| 29 | +@font-face { |
| 30 | + font-family: "Montserrat"; |
| 31 | + font-weight: 700; |
| 32 | + font-style: normal; |
| 33 | + font-display: swap; |
| 34 | + src: url("fonts/Montserrat-Bold.woff2"); |
25 | 35 | } |
26 | 36 |
|
27 | 37 | /* Default (light) theme colors */ |
|
148 | 158 | --footer-color: #808080; |
149 | 159 |
|
150 | 160 | --system-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; |
| 161 | + --header-font-family: "Montserrat", var(--system-font-family); |
151 | 162 | --monospace-font-family: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, Courier, monospace; |
152 | 163 | } |
153 | 164 |
|
|
279 | 290 | } |
280 | 291 |
|
281 | 292 | body, |
282 | | -h1, |
283 | | -h2, |
284 | | -h3, |
285 | | -h4, |
286 | | -h5, |
287 | | -h6, |
288 | 293 | input[type="text"], |
289 | 294 | input[type="button"], |
290 | 295 | input[type="reset"], |
291 | 296 | input[type="submit"], |
292 | 297 | textarea, |
293 | | -legend, |
294 | 298 | .btn, |
295 | | -.rst-content .toctree-wrapper p.caption, |
296 | 299 | .rst-versions { |
297 | 300 | /* Use a system font stack for better performance (no Web fonts required) */ |
298 | 301 | font-family: var(--system-font-family); |
299 | | - /* Some fonts that we use (namely JetBrains Mono) can come with ligatures. It's better to opt-in if needed. */ |
300 | | - font-variant-ligatures: none; |
301 | 302 | } |
302 | 303 |
|
303 | 304 | h1, |
|
308 | 309 | h6, |
309 | 310 | legend, |
310 | 311 | .rst-content .toctree-wrapper p.caption { |
311 | | - /* Use a lighter font for headers (Medium instead of Bold) */ |
312 | | - font-weight: 500; |
| 312 | + /* Use the same font as the godotengine.org website. */ |
| 313 | + font-family: var(--header-font-family); |
313 | 314 | } |
314 | 315 |
|
315 | 316 | /* See <https://github.com/godotengine/godot-docs/pull/5876> for context. */ |
@@ -500,6 +501,7 @@ html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not( |
500 | 501 | html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).method > dt, |
501 | 502 | html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).attribute > dt { |
502 | 503 | font-family: var(--monospace-font-family); |
| 504 | + font-variant-ligatures: none; |
503 | 505 | font-size: 90%; |
504 | 506 | font-weight: normal; |
505 | 507 | margin-bottom: 16px; |
@@ -551,6 +553,7 @@ html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not( |
551 | 553 | } |
552 | 554 | html.writer-html5 .rst-content dl.field-list > dd strong { |
553 | 555 | font-family: var(--monospace-font-family); |
| 556 | + font-variant-ligatures: none; |
554 | 557 | } |
555 | 558 |
|
556 | 559 | footer { |
@@ -802,6 +805,7 @@ code, |
802 | 805 | .rst-content code { |
803 | 806 | font-size: .875em; |
804 | 807 | font-family: var(--monospace-font-family); |
| 808 | + font-variant-ligatures: none; |
805 | 809 | background-color: var(--code-background-color); |
806 | 810 | border: none; |
807 | 811 | border-radius: 4px; |
@@ -830,6 +834,7 @@ code, |
830 | 834 | font-size: 14px; |
831 | 835 | line-height: 1.5; |
832 | 836 | font-family: var(--monospace-font-family); |
| 837 | + font-variant-ligatures: none; |
833 | 838 | } |
834 | 839 |
|
835 | 840 | /* Code tab display tweaks */ |
@@ -1098,6 +1103,7 @@ kbd.compound > .kbd, |
1098 | 1103 | .classref-descriptions-group > p.classref-enumeration-constant { |
1099 | 1104 | color: var(--classref-secondary-color); |
1100 | 1105 | font-family: var(--monospace-font-family); |
| 1106 | + font-variant-ligatures: none; |
1101 | 1107 | font-size: 110%; |
1102 | 1108 | font-weight: 600; |
1103 | 1109 | margin-bottom: 18px; |
@@ -1194,6 +1200,7 @@ p + .classref-constant { |
1194 | 1200 |
|
1195 | 1201 | .classref-property-setget p { |
1196 | 1202 | font-family: var(--monospace-font-family); |
| 1203 | + font-variant-ligatures: none; |
1197 | 1204 | font-size: 100%; |
1198 | 1205 | line-height: 22px; |
1199 | 1206 | } |
|
0 commit comments