From 682e237df7e8b22f820d14a4adee58e6e2f84268 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 11 Sep 2026 12:38:56 -0300 Subject: trunk: resume before the Reload experiment Empty marker on the last pre-Reload change. Keep the Reload experiment on reload (3801914), its first change on reload-start (200a1fc), and the unfinished performance investigation on reload-perf-wip. --- src/macos/Sources/AppDelegate.swift | 5 +++-- src/macos/Sources/PardesView.swift | 5 +++-- src/macos/pardes.h | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/macos') diff --git a/src/macos/Sources/AppDelegate.swift b/src/macos/Sources/AppDelegate.swift index 2d411873..eb499f1b 100644 --- a/src/macos/Sources/AppDelegate.swift +++ b/src/macos/Sources/AppDelegate.swift @@ -585,8 +585,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate, PardesViewDelegate { // is already waiting by the time the tick returns. The view re-measures // and calls back through pardesViewDidResize, so the grid the core is // holding follows the cell that just changed size. - if let wanted = pardes_font_take() { - view.adoptFont(path: String(cString: wanted)) + var fontSize: UInt16 = 0 + if let wanted = pardes_font_take(&fontSize) { + view.adoptFont(path: String(cString: wanted), sizeHundredths: fontSize) } if pardes_should_quit() { diff --git a/src/macos/Sources/PardesView.swift b/src/macos/Sources/PardesView.swift index f9afa7b1..5c5bc8ba 100644 --- a/src/macos/Sources/PardesView.swift +++ b/src/macos/Sources/PardesView.swift @@ -761,8 +761,9 @@ final class PardesView: NSView { } /// The file `Font ` resolved to, straight from the core. - func adoptFont(path: String) { - wear(size: fontSize, path: path, resolvesRequest: true) + func adoptFont(path: String, sizeHundredths: UInt16) { + let size = sizeHundredths == 0 ? fontSize : CGFloat(sizeHundredths) / 100 + wear(size: size, path: path, resolvesRequest: true) } /// Cmd+ and Cmd-. Whole points, because the cell is rounded to whole diff --git a/src/macos/pardes.h b/src/macos/pardes.h index c28b3514..845c8096 100644 --- a/src/macos/pardes.h +++ b/src/macos/pardes.h @@ -486,7 +486,8 @@ pardes_haptic_e pardes_take_haptic(void); // pardes_resize. A file the host cannot load must be rejected explicitly while // keeping the face that works; otherwise Config would leave the request pending // forever or claim a fallback was accepted. -const char *pardes_font_take(void); +// Optional size in native points; zero preserves the current size. +const char *pardes_font_take(uint16_t *size_hundredths); // Boot, zoom and display-scale changes observe the face already on screen; // this never consumes a pending request. `point_hundredths` is the effective -- cgit v1.3