tweak font

This commit is contained in:
Kaz Saita(raspi4) 2024-03-21 19:47:57 +09:00
parent 94e9e84753
commit 50e306fd7c

View file

@ -22,10 +22,12 @@ export interface Theme {
}
}
; const DEFAULT_SANS_SERIF =
'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif'
const DEFAULT_MONO = "ui-monospace, SFMono-Regular, SF Mono, Menlo, monospace"
// const DEFAULT_SANS_SERIF = '-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif'
//const DEFAULT_MONO = "ui-monospace, SFMono-Regular, SF Mono, Menlo, monospace"
const DEFAULT_SANS_SERIF = '"Helvetica Neue", "BIZ UDPGothic", "Helvetica", "Noto Sans", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Arial", "Yu Gothic", "Meiryo", sans-serif'
const DEFAULT_MONO = '"Inconsolata", "Noto Mono", monospace'
const DEFAULT_SERIF = '"Times New Roman", "BIZ UDPMincho", "Noto Serif", "YuMincho", "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif'
export function googleFontHref(theme: Theme) {
const { code, header, body } = theme.typography
return `https://fonts.googleapis.com/css2?family=${code}&family=${header}:wght@400;700&family=${body}:ital,wght@0,400;0,600;1,400;1,600&display=swap`
@ -45,9 +47,9 @@ ${stylesheet.join("\n\n")}
--tertiary: ${theme.colors.lightMode.tertiary};
--highlight: ${theme.colors.lightMode.highlight};
--headerFont: "${theme.typography.header}", ${DEFAULT_SANS_SERIF};
--bodyFont: "${theme.typography.body}", ${DEFAULT_SANS_SERIF};
--codeFont: "${theme.typography.code}", ${DEFAULT_MONO};
--headerFont: ${DEFAULT_SANS_SERIF};
--bodyFont: ${DEFAULT_SERIF};
--codeFont: ${DEFAULT_MONO};
}
:root[saved-theme="dark"] {