fix: self-host fonts instead of loading from Google Fonts CDN
Loading fonts from fonts.googleapis.com sends user IP addresses to Google on every page load — a GDPR violation. Self-host DM Sans and JetBrains Mono as woff2 files bundled with the UI. - Download DM Sans (400/500/600/700 + 400 italic) woff2 files - Download JetBrains Mono (400/500/600) woff2 files - Replace @import url(googleapis) with local @font-face declarations - Both fonts are OFL-licensed (free to self-host) - Total size: ~135KB for all 8 font files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
BIN
ui/src/fonts/dm-sans-400-italic.woff2
Normal file
BIN
ui/src/fonts/dm-sans-400-italic.woff2
Normal file
Binary file not shown.
BIN
ui/src/fonts/dm-sans-400.woff2
Normal file
BIN
ui/src/fonts/dm-sans-400.woff2
Normal file
Binary file not shown.
BIN
ui/src/fonts/dm-sans-500.woff2
Normal file
BIN
ui/src/fonts/dm-sans-500.woff2
Normal file
Binary file not shown.
BIN
ui/src/fonts/dm-sans-600.woff2
Normal file
BIN
ui/src/fonts/dm-sans-600.woff2
Normal file
Binary file not shown.
BIN
ui/src/fonts/dm-sans-700.woff2
Normal file
BIN
ui/src/fonts/dm-sans-700.woff2
Normal file
Binary file not shown.
BIN
ui/src/fonts/jetbrains-mono-400.woff2
Normal file
BIN
ui/src/fonts/jetbrains-mono-400.woff2
Normal file
Binary file not shown.
BIN
ui/src/fonts/jetbrains-mono-500.woff2
Normal file
BIN
ui/src/fonts/jetbrains-mono-500.woff2
Normal file
Binary file not shown.
BIN
ui/src/fonts/jetbrains-mono-600.woff2
Normal file
BIN
ui/src/fonts/jetbrains-mono-600.woff2
Normal file
Binary file not shown.
@@ -1,4 +1,62 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=JetBrains+Mono:wght@400;500;600&display=swap');
|
||||
/* DM Sans — self-hosted (GDPR compliant) */
|
||||
@font-face {
|
||||
font-family: 'DM Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url('./fonts/dm-sans-400.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'DM Sans';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url('./fonts/dm-sans-500.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'DM Sans';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url('./fonts/dm-sans-600.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'DM Sans';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url('./fonts/dm-sans-700.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'DM Sans';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url('./fonts/dm-sans-400-italic.woff2') format('woff2');
|
||||
}
|
||||
|
||||
/* JetBrains Mono — self-hosted (GDPR compliant) */
|
||||
@font-face {
|
||||
font-family: 'JetBrains Mono';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url('./fonts/jetbrains-mono-400.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'JetBrains Mono';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url('./fonts/jetbrains-mono-500.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'JetBrains Mono';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url('./fonts/jetbrains-mono-600.woff2') format('woff2');
|
||||
}
|
||||
|
||||
:root {
|
||||
font-family: 'DM Sans', system-ui, sans-serif;
|
||||
|
||||
Reference in New Issue
Block a user