diff --git a/include/ghostty.h b/include/ghostty.h index 56027bfad..d65eb7203 100644 --- a/include/ghostty.h +++ b/include/ghostty.h @@ -379,7 +379,7 @@ typedef struct { ghostty_platform_u platform; void* userdata; double scale_factor; - uint16_t font_size; + uint8_t font_size; const char* working_directory; const char* command; } ghostty_surface_config_s; diff --git a/macos/Sources/Ghostty/SurfaceView.swift b/macos/Sources/Ghostty/SurfaceView.swift index f4fefbaed..d007a898c 100644 --- a/macos/Sources/Ghostty/SurfaceView.swift +++ b/macos/Sources/Ghostty/SurfaceView.swift @@ -252,7 +252,7 @@ extension Ghostty { /// libghostty, usually from the Ghostty configuration. struct SurfaceConfiguration { /// Explicit font size to use in points - var fontSize: UInt16? = nil + var fontSize: UInt8? = nil /// Explicit working directory to set var workingDirectory: String? = nil diff --git a/src/apprt/embedded.zig b/src/apprt/embedded.zig index ea6d81cc2..741cf7cc3 100644 --- a/src/apprt/embedded.zig +++ b/src/apprt/embedded.zig @@ -313,7 +313,7 @@ pub const Surface = struct { scale_factor: f64 = 1, /// The font size to inherit. If 0, default font size will be used. - font_size: u16 = 0, + font_size: u8 = 0, /// The working directory to load into. working_directory: [*:0]const u8 = "", @@ -1041,7 +1041,7 @@ pub const Surface = struct { } fn newSurfaceOptions(self: *const Surface) apprt.Surface.Options { - const font_size: u16 = font_size: { + const font_size: u8 = font_size: { if (!self.app.config.@"window-inherit-font-size") break :font_size 0; break :font_size self.core_surface.font_size.points; };