aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/pkg/macos/text/font.zig
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/font.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/pkg/macos/text/font.zig')
-rw-r--r--vendor/libghostty-vt/pkg/macos/text/font.zig13
1 files changed, 12 insertions, 1 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))));
}