mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 01:06:08 +03:00
pkg/macos: CTFontCreateForString
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user