From bb039399fc2add9580197f432e8a72053f7dafce Mon Sep 17 00:00:00 2001 From: Developer Date: Tue, 7 Apr 2026 16:40:52 -0700 Subject: [PATCH] Add font source/family settings matching v1.4.0 feature set Restored the font configuration that was missing from the Tauri rewrite. Settings now include: - Font Source: System Font, Web-Safe, Google Font - System Font: text input for any installed font family - Web-Safe: dropdown with 13 universal fonts (Arial, Courier New, etc.) - Google Font: dropdown with 35 fonts organized by category (Sans Serif, Serif, Monospace, Display, Handwriting) - Font Size: range slider (8-32px) All font settings are saved to config and applied to the OBS web display and server sync. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/lib/components/Settings.svelte | 101 +++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/src/lib/components/Settings.svelte b/src/lib/components/Settings.svelte index 311ba9b..4e2d566 100644 --- a/src/lib/components/Settings.svelte +++ b/src/lib/components/Settings.svelte @@ -27,6 +27,10 @@ let showTimestamps = $state(true); let fadeSeconds = $state(10); let maxLines = $state(100); + let fontSource = $state("System Font"); + let fontFamily = $state("Courier"); + let websafeFont = $state("Arial"); + let googleFont = $state("Roboto"); let fontSize = $state(12); let userColor = $state("#4CAF50"); let textColor = $state("#FFFFFF"); @@ -99,6 +103,10 @@ showTimestamps = cfg.display.show_timestamps; fadeSeconds = cfg.display.fade_after_seconds; maxLines = cfg.display.max_lines; + fontSource = cfg.display.font_source ?? "System Font"; + fontFamily = cfg.display.font_family ?? "Courier"; + websafeFont = cfg.display.websafe_font ?? "Arial"; + googleFont = cfg.display.google_font ?? "Roboto"; fontSize = cfg.display.font_size; userColor = cfg.display.user_color; textColor = cfg.display.text_color; @@ -174,6 +182,10 @@ show_timestamps: showTimestamps, fade_after_seconds: fadeSeconds, max_lines: maxLines, + font_source: fontSource, + font_family: fontFamily, + websafe_font: websafeFont, + google_font: googleFont, font_size: fontSize, user_color: userColor, text_color: textColor, @@ -485,6 +497,95 @@ bind:value={maxLines} /> +
+ + +
+ {#if fontSource === "System Font"} +
+ + +
+ {/if} + {#if fontSource === "Web-Safe"} +
+ + +
+ {/if} + {#if fontSource === "Google Font"} +
+ + +

+ Browse more at fonts.google.com +

+
+ {/if}