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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user