diff --git a/src/font/discovery.zig b/src/font/discovery.zig index 67236d5c9..e73ea626f 100644 --- a/src/font/discovery.zig +++ b/src/font/discovery.zig @@ -235,21 +235,7 @@ pub const Descriptor = struct { ); } - // Build our descriptor from attrs - var desc = try macos.text.FontDescriptor.createWithAttributes(@ptrCast(attrs)); - errdefer desc.release(); - - // Variations are built by copying the descriptor. I don't know a way - // to set it on attrs directly. - for (self.variations) |v| { - const id = try macos.foundation.Number.create(.int, @ptrCast(&v.id)); - defer id.release(); - const next = try desc.createCopyWithVariation(id, v.value); - desc.release(); - desc = next; - } - - return desc; + return try macos.text.FontDescriptor.createWithAttributes(@ptrCast(attrs)); } };