diff --git a/src-tauri/src/config.rs b/src-tauri/src/config.rs index dae5ac7..cfb4f7f 100644 --- a/src-tauri/src/config.rs +++ b/src-tauri/src/config.rs @@ -145,12 +145,19 @@ pub struct HikariConfig { #[serde(default)] pub show_thinking_blocks: bool, - // Custom font settings + // Custom terminal font settings #[serde(default)] pub custom_font_path: Option, #[serde(default)] pub custom_font_family: Option, + + // Custom UI font settings + #[serde(default)] + pub custom_ui_font_path: Option, + + #[serde(default)] + pub custom_ui_font_family: Option, } impl Default for HikariConfig { @@ -192,6 +199,8 @@ impl Default for HikariConfig { show_thinking_blocks: false, custom_font_path: None, custom_font_family: None, + custom_ui_font_path: None, + custom_ui_font_family: None, } } } @@ -309,6 +318,8 @@ mod tests { assert!(!config.show_thinking_blocks); assert!(config.custom_font_path.is_none()); assert!(config.custom_font_family.is_none()); + assert!(config.custom_ui_font_path.is_none()); + assert!(config.custom_ui_font_family.is_none()); } #[test] @@ -350,6 +361,8 @@ mod tests { show_thinking_blocks: true, custom_font_path: Some("/home/naomi/.fonts/MyFont.ttf".to_string()), custom_font_family: Some("MyFont".to_string()), + custom_ui_font_path: None, + custom_ui_font_family: None, }; let json = serde_json::to_string(&config).unwrap(); diff --git a/src/app.css b/src/app.css index 13b8324..88bf299 100644 --- a/src/app.css +++ b/src/app.css @@ -154,11 +154,7 @@ body { padding: 0; height: 100%; overflow: hidden; - font-family: - "Segoe UI", - system-ui, - -apple-system, - sans-serif; + font-family: var(--ui-font-family, "Segoe UI", system-ui, -apple-system, sans-serif); background: var(--bg-primary); color: var(--text-primary); } diff --git a/src/lib/components/ConfigSidebar.svelte b/src/lib/components/ConfigSidebar.svelte index 8d5ff5e..0047489 100644 --- a/src/lib/components/ConfigSidebar.svelte +++ b/src/lib/components/ConfigSidebar.svelte @@ -6,6 +6,7 @@ type CustomThemeColors, applyFontSize, applyCustomFont, + applyCustomUiFont, applyCustomThemeColors, MIN_FONT_SIZE, MAX_FONT_SIZE, @@ -63,12 +64,17 @@ background_image_opacity: 0.3, custom_font_path: null, custom_font_family: null, + custom_ui_font_path: null, + custom_ui_font_family: null, }); let showCustomThemeEditor = $state(false); let customFontPathInput = $state(""); let customFontFamilyInput = $state(""); let customFontStatus: string | null = $state(null); + let customUiFontPathInput = $state(""); + let customUiFontFamilyInput = $state(""); + let customUiFontStatus: string | null = $state(null); interface AuthStatus { is_logged_in: boolean; @@ -96,6 +102,8 @@ config = { ...c }; customFontPathInput = c.custom_font_path ?? ""; customFontFamilyInput = c.custom_font_family ?? ""; + customUiFontPathInput = c.custom_ui_font_path ?? ""; + customUiFontFamilyInput = c.custom_ui_font_family ?? ""; }); configStore.isSidebarOpen.subscribe((open) => { @@ -1007,6 +1015,68 @@

+ +
+ Custom UI Font +
+ + +
+ + +
+ {#if customUiFontStatus} +

{customUiFontStatus}

+ {/if} +
+

+ Applies to the entire app interface (menus, labels, buttons). Supports Google Fonts URLs, + direct font file URLs, or local file paths. +

+
+