diff --git a/pkg/macos/text/font.zig b/pkg/macos/text/font.zig index 32189f809..e0c1f4891 100644 --- a/pkg/macos/text/font.zig +++ b/pkg/macos/text/font.zig @@ -18,6 +18,18 @@ pub const Font = opaque { ) orelse Allocator.Error.OutOfMemory; } + pub fn createForString( + self: *Font, + str: *foundation.String, + range: foundation.Range, + ) ?*Font { + return @ptrCast(@constCast(c.CTFontCreateForString( + @ptrCast(self), + @ptrCast(str), + @bitCast(range), + ))); + } + pub fn copyWithAttributes( self: *Font, size: f32,