mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-18 21:40:29 +00:00
pkg/fontconfig: charset can add chars
This commit is contained in:
@@ -11,6 +11,10 @@ pub const CharSet = opaque {
|
||||
c.FcCharSetDestroy(self.cval());
|
||||
}
|
||||
|
||||
pub fn addChar(self: *CharSet, cp: u32) bool {
|
||||
return c.FcCharSetAddChar(self.cval(), cp) == c.FcTrue;
|
||||
}
|
||||
|
||||
pub fn hasChar(self: *const CharSet, cp: u32) bool {
|
||||
return c.FcCharSetHasChar(self.cvalConst(), cp) == c.FcTrue;
|
||||
}
|
||||
@@ -37,4 +41,6 @@ test "create" {
|
||||
defer fs.destroy();
|
||||
|
||||
try testing.expect(!fs.hasChar(0x20));
|
||||
try testing.expect(fs.addChar(0x20));
|
||||
try testing.expect(fs.hasChar(0x20));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user