diff --git a/src/font/DeferredFace.zig b/src/font/DeferredFace.zig index 70dfafe7b..9d97952f5 100644 --- a/src/font/DeferredFace.zig +++ b/src/font/DeferredFace.zig @@ -431,6 +431,6 @@ test "coretext" { try testing.expect(n.len > 0); // Load it and verify it works - const face = try def.load(lib, .{ .points = 12 }); + const face = try def.load(lib, .{ .size = .{ .points = 12 } }); try testing.expect(face.glyphIndex(' ') != null); } diff --git a/src/font/face/coretext.zig b/src/font/face/coretext.zig index 803cb46b1..e4706b67b 100644 --- a/src/font/face/coretext.zig +++ b/src/font/face/coretext.zig @@ -182,6 +182,7 @@ pub const Face = struct { pub fn setVariations( self: *Face, vs: []const font.face.Variation, + opts: font.face.Options, ) !void { // Create a new font descriptor with all the variations set. var desc = self.font.copyDescriptor(); @@ -197,7 +198,7 @@ pub const Face = struct { // Initialize a font based on these attributes. const ct_font = try self.font.copyWithAttributes(0, null, desc); errdefer ct_font.release(); - const face = try initFont(ct_font); + const face = try initFont(ct_font, opts); self.deinit(); self.* = face; } @@ -622,7 +623,7 @@ test "variable set variation" { try face.setVariations(&.{ .{ .id = font.face.Variation.Id.init("wght"), .value = 400 }, - }); + }, .{ .size = .{ .points = 12 } }); // Generate all visible ASCII var i: u8 = 32;