refactor(notes): rename title font to heading font

These fonts apply to markdown headings (h1-h6), so "heading" is more
accurate than "title". Renames the chosen*Font field, store action, and
the --heading-font-family CSS variable.

Keeps backward compatibility: .remanso.json still honors the legacy `t`
key (alongside the new `h`), and a saved `chosenTitleFont` in
localStorage is migrated on load so existing preferences survive.
This commit is contained in:
Julien Calixte
2026-06-30 00:41:54 +02:00
parent b8c9d07930
commit 4104e138c1
9 changed files with 116 additions and 29 deletions

View File

@@ -16,12 +16,12 @@ export const useUserSettings = () => {
const fontSize = store.userSettings?.chosenFontSize
const bodyFont = store.userSettings?.chosenBodyFont
const titleFont = store.userSettings?.chosenTitleFont
const headingFont = store.userSettings?.chosenHeadingFont
downloadFont(bodyFont || DEFAULT_FONT_POLICY, "--font-family")
downloadFont(
titleFont || bodyFont || DEFAULT_FONT_POLICY,
"--title-font-family"
headingFont || bodyFont || DEFAULT_FONT_POLICY,
"--heading-font-family"
)
root.style.setProperty("--font-size", fontSize || DEFAULT_FONT_SIZE)