Skip to content

Commit 059864f

Browse files
authored
Merge pull request #9014 from Calinou/headings-use-montserrat-font
Use Montserrat font for headings to match godotengine.org
2 parents c8d799d + 474c9b8 commit 059864f

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

_static/css/custom.css

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,31 @@
77

88
@font-face {
99
font-family: "JetBrains Mono";
10-
src: url('fonts/JetBrainsMono-Regular.woff2');
1110
font-weight: 400;
1211
font-style: normal;
12+
font-display: swap;
13+
src: url("fonts/JetBrainsMono-Regular.woff2");
1314
}
1415
@font-face {
1516
font-family: "JetBrains Mono";
16-
src: url('fonts/JetBrainsMono-Medium.woff2');
1717
font-weight: 600;
1818
font-style: normal;
19+
font-display: swap;
20+
src: url("fonts/JetBrainsMono-Medium.woff2");
1921
}
2022
@font-face {
2123
font-family: "JetBrains Mono";
22-
src: url('fonts/JetBrainsMono-Bold.woff2');
2324
font-weight: 700;
2425
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");
2535
}
2636

2737
/* Default (light) theme colors */
@@ -148,6 +158,7 @@
148158
--footer-color: #808080;
149159

150160
--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);
151162
--monospace-font-family: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, Courier, monospace;
152163
}
153164

@@ -279,25 +290,15 @@
279290
}
280291

281292
body,
282-
h1,
283-
h2,
284-
h3,
285-
h4,
286-
h5,
287-
h6,
288293
input[type="text"],
289294
input[type="button"],
290295
input[type="reset"],
291296
input[type="submit"],
292297
textarea,
293-
legend,
294298
.btn,
295-
.rst-content .toctree-wrapper p.caption,
296299
.rst-versions {
297300
/* Use a system font stack for better performance (no Web fonts required) */
298301
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;
301302
}
302303

303304
h1,
@@ -308,8 +309,8 @@ h5,
308309
h6,
309310
legend,
310311
.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);
313314
}
314315

315316
/* 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(
500501
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).method > dt,
501502
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).attribute > dt {
502503
font-family: var(--monospace-font-family);
504+
font-variant-ligatures: none;
503505
font-size: 90%;
504506
font-weight: normal;
505507
margin-bottom: 16px;
@@ -551,6 +553,7 @@ html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(
551553
}
552554
html.writer-html5 .rst-content dl.field-list > dd strong {
553555
font-family: var(--monospace-font-family);
556+
font-variant-ligatures: none;
554557
}
555558

556559
footer {
@@ -802,6 +805,7 @@ code,
802805
.rst-content code {
803806
font-size: .875em;
804807
font-family: var(--monospace-font-family);
808+
font-variant-ligatures: none;
805809
background-color: var(--code-background-color);
806810
border: none;
807811
border-radius: 4px;
@@ -830,6 +834,7 @@ code,
830834
font-size: 14px;
831835
line-height: 1.5;
832836
font-family: var(--monospace-font-family);
837+
font-variant-ligatures: none;
833838
}
834839

835840
/* Code tab display tweaks */
@@ -1098,6 +1103,7 @@ kbd.compound > .kbd,
10981103
.classref-descriptions-group > p.classref-enumeration-constant {
10991104
color: var(--classref-secondary-color);
11001105
font-family: var(--monospace-font-family);
1106+
font-variant-ligatures: none;
11011107
font-size: 110%;
11021108
font-weight: 600;
11031109
margin-bottom: 18px;
@@ -1194,6 +1200,7 @@ p + .classref-constant {
11941200

11951201
.classref-property-setget p {
11961202
font-family: var(--monospace-font-family);
1203+
font-variant-ligatures: none;
11971204
font-size: 100%;
11981205
line-height: 22px;
11991206
}
83.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)