mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-26 17:11:40 +00:00
fontconfig: fc-match
This commit is contained in:
25
pkg/fontconfig/char_set.zig
Normal file
25
pkg/fontconfig/char_set.zig
Normal file
@@ -0,0 +1,25 @@
|
||||
const std = @import("std");
|
||||
const assert = std.debug.assert;
|
||||
const c = @import("c.zig");
|
||||
|
||||
pub const CharSet = opaque {
|
||||
pub fn create() *CharSet {
|
||||
return @ptrCast(*CharSet, c.FcCharSetCreate());
|
||||
}
|
||||
|
||||
pub fn destroy(self: *CharSet) void {
|
||||
c.FcCharSetDestroy(self.cval());
|
||||
}
|
||||
|
||||
pub inline fn cval(self: *CharSet) *c.struct__FcCharSet {
|
||||
return @ptrCast(
|
||||
*c.struct__FcCharSet,
|
||||
self,
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
test "create" {
|
||||
var fs = CharSet.create();
|
||||
defer fs.destroy();
|
||||
}
|
||||
Reference in New Issue
Block a user