From a1f06bd7804e2212d85bacff8060e4c1bf879726 Mon Sep 17 00:00:00 2001 From: yetone Date: Wed, 28 Oct 2026 15:32:30 +0800 Subject: [PATCH] gui: a browser tab offers the fonts of the computer it runs on (Norcleeh) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Norcleeh (Discord #general): magpie in Docker, used through the web GUI, Settings' font menu doesn't list the fonts he installed on his own computer; the app does. Cause, confirmed in the code: a tab's list is /api/fonts, the server's families (none in a nogui build such as Docker) plus commonFamilies, filtered by what the browser draws. A family that is only on the browser's computer was never offered, and a choice the server doesn't list was dropped by desktopFonts.available. Now (webfonts.js, which only a browser tab loads; the app's windows are unchanged): - Where the Local Font Access API is (Chromium on https or localhost), the press that opens a family menu calls queryLocalFonts() once a page, and at load when the local-fonts permission is already given. The families join the list with their real styles ("SemiBold Condensed Italic" -> weight 600, 75%, italic). - Elsewhere (Safari, Firefox, a plain-http LAN address, a refused permission) the menu's search says "Search or type a font name…" and offers Use "name" for a family the list lacks, enabled when the canvas probe says this browser draws it, greyed with "This browser can't find this font" when not; Enter takes it. - A chosen family the server doesn't list stays in the tab's list on later loads while the browser draws it, so it keeps being applied. - The app's menu (openProtoMenu), never a