mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-30 19:13:55 +00:00
src/font: working on initiaizing deferred fonts from fc
This commit is contained in:
@@ -32,6 +32,18 @@ pub fn version(self: Library) Version {
|
||||
return v;
|
||||
}
|
||||
|
||||
/// Call FT_New_Face to open a font from a file.
|
||||
pub fn initFace(self: Library, path: [:0]const u8, index: i32) Error!Face {
|
||||
var face: Face = undefined;
|
||||
try intToError(c.FT_New_Face(
|
||||
self.handle,
|
||||
path.ptr,
|
||||
index,
|
||||
&face.handle,
|
||||
));
|
||||
return face;
|
||||
}
|
||||
|
||||
/// Call FT_Open_Face to open a font that has been loaded into memory.
|
||||
pub fn initMemoryFace(self: Library, data: []const u8, index: i32) Error!Face {
|
||||
var face: Face = undefined;
|
||||
|
||||
Reference in New Issue
Block a user