Skip to content
This repository was archived by the owner on Sep 26, 2026. It is now read-only.

Commit 01ad8cd

Browse files
authored
Merge pull request #1 from IamLRBA/fonts
feat: replace Noto Sans with Josefin Sans as primary font
2 parents 5ca07ef + c1bb37a commit 01ad8cd

8 files changed

Lines changed: 146 additions & 5 deletions

‎src/css/custom.css‎

Lines changed: 135 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,45 @@
55
*/
66
@import './ode-tokens.css';
77

8+
/* Self-hosted Josefin Sans font faces */
89
@font-face {
9-
font-family: 'Noto Sans';
10+
font-family: 'Josefin Sans';
11+
font-style: normal;
12+
font-weight: 300;
13+
font-display: swap;
14+
src: url('/fonts/JosefinSans-Light.woff2') format('woff2');
15+
}
16+
17+
@font-face {
18+
font-family: 'Josefin Sans';
1019
font-style: normal;
1120
font-weight: 400;
1221
font-display: swap;
13-
src: url('/fonts/NotoSans-Regular.woff2') format('woff2'),
14-
url('/fonts/NotoSans-Regular.ttf') format('truetype');
22+
src: url('/fonts/JosefinSans-Regular.woff2') format('woff2');
23+
}
24+
25+
@font-face {
26+
font-family: 'Josefin Sans';
27+
font-style: normal;
28+
font-weight: 500;
29+
font-display: swap;
30+
src: url('/fonts/JosefinSans-Medium.woff2') format('woff2');
31+
}
32+
33+
@font-face {
34+
font-family: 'Josefin Sans';
35+
font-style: normal;
36+
font-weight: 600;
37+
font-display: swap;
38+
src: url('/fonts/JosefinSans-SemiBold.woff2') format('woff2');
39+
}
40+
41+
@font-face {
42+
font-family: 'Josefin Sans';
43+
font-style: normal;
44+
font-weight: 700;
45+
font-display: swap;
46+
src: url('/fonts/JosefinSans-SemiBold.woff2') format('woff2');
1547
}
1648

1749
:root {
@@ -24,6 +56,9 @@
2456
--navbar-text-color-light: var(--ode-color-neutral-600);
2557
--navbar-border-top: var(--ode-color-neutral-900);
2658
--navbar-border-bottom: var(--ifm-color-primary);
59+
60+
/* Set Josefin Sans as the default font for all body text */
61+
--ifm-font-family-base: var(--ode-font-family-sans);
2762
}
2863

2964
[data-theme='dark'] {
@@ -810,3 +845,100 @@ html[data-theme='dark'] .alert {
810845
.markdown > .cards:last-child {
811846
margin-bottom: 0;
812847
}
848+
849+
/* ============================================
850+
TYPOGRAPHY - Apply Josefin Sans to all body text
851+
============================================ */
852+
853+
/* Apply Josefin Sans to body and all text elements */
854+
body,
855+
html {
856+
font-family: var(--ode-font-family-sans);
857+
font-weight: var(--ode-font-weight-body);
858+
}
859+
860+
/* Apply body text weight to regular text elements */
861+
p,
862+
li,
863+
td,
864+
th,
865+
span,
866+
div,
867+
label,
868+
input,
869+
textarea,
870+
select {
871+
font-family: var(--ode-font-family-sans);
872+
font-weight: var(--ode-font-weight-body);
873+
}
874+
875+
/* Links use body weight */
876+
a {
877+
font-family: var(--ode-font-family-sans);
878+
font-weight: var(--ode-font-weight-link);
879+
}
880+
881+
/* Main headings (h1, h2, h3) use primary heading weight */
882+
h1, h2, h3 {
883+
font-family: var(--ode-font-family-sans);
884+
font-weight: var(--ode-font-weight-heading-primary);
885+
}
886+
887+
/* Subheadings (h4, h5, h6) use secondary heading weight */
888+
h4, h5, h6 {
889+
font-family: var(--ode-font-family-sans);
890+
font-weight: var(--ode-font-weight-heading-secondary);
891+
}
892+
893+
/* Buttons use button weight */
894+
button {
895+
font-family: var(--ode-font-family-sans);
896+
font-weight: var(--ode-font-weight-button);
897+
}
898+
899+
/* Ensure code elements always use monospace fonts */
900+
code,
901+
pre,
902+
kbd,
903+
samp,
904+
var,
905+
.code-block,
906+
.prism-code,
907+
.token,
908+
.hljs,
909+
[class*="codeBlock"],
910+
[class*="code-block"] {
911+
font-family: var(--ode-font-family-mono) !important;
912+
}
913+
914+
/* Docusaurus specific code elements */
915+
.theme-doc-markdown code,
916+
.theme-doc-markdown pre code,
917+
.margin-top--md code,
918+
.margin-bottom--md code {
919+
font-family: var(--ode-font-family-mono) !important;
920+
}
921+
922+
/* Ensure Docusaurus markdown content uses token-based font weights */
923+
.theme-doc-markdown p,
924+
.theme-doc-markdown li,
925+
.theme-doc-markdown td,
926+
.theme-doc-markdown span,
927+
.theme-doc-markdown div,
928+
.theme-doc-markdown a:not(.hash-link) {
929+
font-weight: var(--ode-font-weight-body);
930+
}
931+
932+
/* Main headings in markdown */
933+
.theme-doc-markdown h1,
934+
.theme-doc-markdown h2,
935+
.theme-doc-markdown h3 {
936+
font-weight: var(--ode-font-weight-heading-primary);
937+
}
938+
939+
/* Subheadings in markdown */
940+
.theme-doc-markdown h4,
941+
.theme-doc-markdown h5,
942+
.theme-doc-markdown h6 {
943+
font-weight: var(--ode-font-weight-heading-secondary);
944+
}

‎src/css/ode-tokens.css‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@
105105
/* ============================================
106106
TYPOGRAPHY - Font Families
107107
============================================ */
108-
--ode-font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
108+
--ode-font-family-sans: 'Josefin Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
109109
--ode-font-family-mono: 'Courier New', Consolas, monospace;
110-
--ode-font-family-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
110+
--ode-font-family-display: 'Josefin Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
111111

112112
/* ============================================
113113
TYPOGRAPHY - Font Sizes
@@ -132,6 +132,15 @@
132132
--ode-font-weight-semibold: 600;
133133
--ode-font-weight-bold: 700;
134134

135+
/* ============================================
136+
TYPOGRAPHY - Font Weights by Element Type
137+
============================================ */
138+
--ode-font-weight-body: var(--ode-font-weight-light); /* 300 - Body text */
139+
--ode-font-weight-heading-primary: var(--ode-font-weight-semibold); /* 600 - h1, h2, h3 */
140+
--ode-font-weight-heading-secondary: var(--ode-font-weight-medium); /* 500 - h4, h5, h6 */
141+
--ode-font-weight-button: var(--ode-font-weight-regular); /* 400 - Buttons */
142+
--ode-font-weight-link: var(--ode-font-weight-light); /* 300 - Links */
143+
135144
/* ============================================
136145
TYPOGRAPHY - Line Heights
137146
============================================ */
11.9 KB
Binary file not shown.
12 KB
Binary file not shown.
12.1 KB
Binary file not shown.
12 KB
Binary file not shown.

‎static/fonts/NotoSans-Regular.ttf‎

-543 KB
Binary file not shown.
-9.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)