aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/pkg/macos/text
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/pkg/macos/text
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/pkg/macos/text')
-rw-r--r--vendor/libghostty-vt/pkg/macos/text/font.zig13
-rw-r--r--vendor/libghostty-vt/pkg/macos/text/typesetter.zig6
2 files changed, 15 insertions, 4 deletions
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))));
}
diff --git a/vendor/libghostty-vt/pkg/macos/text/typesetter.zig b/vendor/libghostty-vt/pkg/macos/text/typesetter.zig
index dc07df98..16cd7816 100644
--- a/vendor/libghostty-vt/pkg/macos/text/typesetter.zig
+++ b/vendor/libghostty-vt/pkg/macos/text/typesetter.zig
@@ -27,10 +27,10 @@ pub const Typesetter = opaque {
pub fn createLine(
self: *Typesetter,
range: foundation.c.CFRange,
- ) *text.Line {
- return @ptrFromInt(@intFromPtr(c.CTTypesetterCreateLine(
+ ) Allocator.Error!*text.Line {
+ return @ptrCast(@constCast(c.CTTypesetterCreateLine(
@ptrCast(self),
range,
- )));
+ ) orelse return error.OutOfMemory));
}
};