font/fontconfig: support style descriptor

This commit is contained in:
Mitchell Hashimoto
2023-09-24 09:05:07 -07:00
parent 966166015f
commit 8e083d8618

View File

@ -64,6 +64,9 @@ pub const Descriptor = struct {
if (self.family) |family| { if (self.family) |family| {
assert(pat.add(.family, .{ .string = family }, false)); assert(pat.add(.family, .{ .string = family }, false));
} }
if (self.style) |style| {
assert(pat.add(.style, .{ .string = style }, false));
}
if (self.codepoint > 0) { if (self.codepoint > 0) {
const cs = fontconfig.CharSet.create(); const cs = fontconfig.CharSet.create();
defer cs.destroy(); defer cs.destroy();