From 425c86179791cd32e2d4ce0ae7f269940b4b0663 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Thu, 10 Sep 2026 21:51:57 +0300 Subject: chore: upgrade libghostty and preserve terminal behavior (#3906) --- vendor/libghostty-vt/pkg/macos/text/font.zig | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'vendor/libghostty-vt/pkg/macos/text/font.zig') diff --git a/vendor/libghostty-vt/pkg/macos/text/font.zig b/vendor/libghostty-vt/pkg/macos/text/font.zig index ea37891f..626b9089 100644 --- a/vendor/libghostty-vt/pkg/macos/text/font.zig +++ b/vendor/libghostty-vt/pkg/macos/text/font.zig @@ -18,6 +18,17 @@ pub const Font = opaque { ) orelse Allocator.Error.OutOfMemory; } + pub fn createWithName(name: *foundation.String, size: f32) Allocator.Error!*Font { + return @as( + ?*Font, + @ptrFromInt(@intFromPtr(c.CTFontCreateWithName( + @ptrCast(name), + size, + null, + ))), + ) orelse Allocator.Error.OutOfMemory; + } + pub fn createForString( self: *Font, str: *foundation.String, @@ -156,7 +167,7 @@ pub const Font = opaque { return @ptrFromInt(@intFromPtr(c.CTFontCopyFamilyName(@ptrCast(self)))); } - pub fn copyDisplayName(self: *Font) *foundation.String { + pub fn copyDisplayName(self: *Font) ?*foundation.String { return @ptrFromInt(@intFromPtr(c.CTFontCopyDisplayName(@ptrCast(self)))); } -- cgit v1.2.3