macos,libghostty: font size is a u8

This commit is contained in:
Mitchell Hashimoto
2024-03-27 20:53:03 -07:00
parent 45019fac7e
commit 9aadf59ab1
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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

View File

@ -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;
};