4794de398ea8337d223a91e207181c56fcf4ad76
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e4aadb4840 |
gui: the header is fitted again when the language or the interface font changes, so the tabs no longer run under the magpie and the traffic lights (kiwiflysky on X)
With a wide interface font, the macOS window's header fit in Chinese but not in English, Japanese or German: the tabs slid left under the magpie and the window's buttons, and in German into the refresh button and the gear. fitTop draws the header in step by step (tight, cramped, inrow, crowded, packed), but it only ran again when .top, .brand or .actions changed size (ResizeObserver) and once on document.fonts.ready. Another language or a font picked later changes only #nav's width, so the header kept the fit it had for the old one. Now translateStatic (every language change) and desktopFonts.apply (every font applied: picked, saved in the other webview, from settings) call fitTop, and document.fonts' loadingdone does too, for a font still loading when it's applied. Both run synchronously, where the change happens. A ResizeObserver on #nav was tried first. It had to defer to a frame, since fitting resizes the nav and WebKit reports that loop as a page error, and the deferred refit moved the page after a click: text-size, number-units, tray-logos and rail-tip went red. That approach was dropped. Measured (830px, macOS window, before): switched live to en, ja and de, the tabs ran 61, 105 and 148px under the magpie (Chromium and WebKit alike). header-relang.test.cjs (new): - Opens a macOS window in Chinese, with the header's tabs picked over the sidebar. - Switches it from Settings to en, zh-TW, ja, de and back. - In English, on the Agents page, it hands in Menlo at each width from 1000 to 640px. Each fit must equal a fresh fitTop. - Sweeps each language from 1100 to 600px: 7.5px clear of the magpie or padding and of the buttons. - Chromium and WebKit. Run on this commit: - header-relang: 12/12 in Chromium and WebKit. Red on origin/main |
||
|
|
bd33e575f1 |
gui: let users choose installed interface and code fonts (#1007)
* gui: choose installed interface and code fonts and styles Discover installed styles through DirectWrite, CoreText and Fontconfig. Keep choices per computer, apply them before paint and notify both desktop webviews after saving; defaults retain platform and Omarchy fallbacks. Verified seven focused Go tests, including real Windows discovery (90 families, 276 styles), 14 font browser cases in Chromium/WebKit, 68 settings/zoom/Omarchy/web cases, go vet, Windows amd64/arm64 and Linux nogui builds. Against the original assets, the new UI test fails with Settings must offer an interface font picker (0 != 1). Full Windows suites have separately reproduced upstream failures; macOS/Linux native discovery is covered by the added CI step. * gui: retain bundled Mac fonts and variable style precision Only filter an undownloaded CoreText face when it is explicitly downloadable; bundled fonts are installed without being downloaded. Use resolved font names when descriptors omit them. Preserve fractional weights and nonnegative CSS widths for named variable styles. * gui: restore the authored font cascade when returning to defaults Apply family-only trait overrides only while a custom face is active. The browser regression catches code under a bold parent becoming 700 instead of its original 400. Keep the compatibility shim first, and apply boot fonts before visible content. * gui: keep font picker review separate from CI integration Leave the native test sources and manual verification command with the feature. Move the added workflow step to a follow-up so the font picker can take the normal review path requested on PR #1007. |