mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 09:16:11 +03:00
pkg/macos: CTFontCreateForString
This commit is contained in:
@ -18,6 +18,18 @@ pub const Font = opaque {
|
|||||||
) orelse Allocator.Error.OutOfMemory;
|
) 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(
|
pub fn copyWithAttributes(
|
||||||
self: *Font,
|
self: *Font,
|
||||||
size: f32,
|
size: f32,
|
||||||
|
Reference in New Issue
Block a user