mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-01-20 03:47:14 +00:00
pkg/macos: create fonts from data
This commit is contained in:
@@ -11,3 +11,12 @@ pub fn createFontDescriptorsFromURL(url: *foundation.URL) ?*foundation.Array {
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
pub fn createFontDescriptorsFromData(data: *foundation.Data) ?*foundation.Array {
|
||||
return @intToPtr(
|
||||
?*foundation.Array,
|
||||
@ptrToInt(c.CTFontManagerCreateFontDescriptorsFromData(
|
||||
@ptrCast(c.CFDataRef, data),
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user