diff options
| author | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2022-08-28 11:21:35 -0700 |
|---|---|---|
| committer | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2022-08-28 11:21:35 -0700 |
| commit | 5d42e2711f328bb295c07d7d97a680409e9c50c5 (patch) | |
| tree | 6ee9afa5b21ab700521d3ef1f58b9e5bdb4d9bcf /pkg/harfbuzz/face.zig | |
| parent | 3d68c72912c81bb82da1199bfaf3f378001f2b7c (diff) | |
pkg/harfbuzz: face, font, freetype
Diffstat (limited to 'pkg/harfbuzz/face.zig')
| -rw-r--r-- | pkg/harfbuzz/face.zig | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkg/harfbuzz/face.zig b/pkg/harfbuzz/face.zig new file mode 100644 index 000000000..2fd3605e8 --- /dev/null +++ b/pkg/harfbuzz/face.zig @@ -0,0 +1,17 @@ +const std = @import("std"); +const c = @import("c.zig"); + +/// A font face is an object that represents a single face from within a font family. +/// +/// More precisely, a font face represents a single face in a binary font file. +/// Font faces are typically built from a binary blob and a face index. +/// Font faces are used to create fonts. +pub const Face = struct { + handle: *c.hb_face_t, + + /// Decreases the reference count on a face object. When the reference + /// count reaches zero, the face is destroyed, freeing all memory. + pub fn destroy(self: *Face) void { + c.hb_face_destroy(self.handle); + } +}; |
