From abd782a7aa45a06221b921746a240b32fe34fd54 Mon Sep 17 00:00:00 2001 From: Gordon Cassie Date: Wed, 24 Apr 2024 21:07:50 -0700 Subject: [PATCH] Fix typo. --- pkg/macos/text/font.zig | 6 +++--- src/font/face/coretext.zig | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/macos/text/font.zig b/pkg/macos/text/font.zig index 1141ab1fa..c26a0f32f 100644 --- a/pkg/macos/text/font.zig +++ b/pkg/macos/text/font.zig @@ -81,7 +81,7 @@ pub const Font = opaque { ); } - pub fn getBoundingRectForGlyphs( + pub fn getBoundingRectsForGlyphs( self: *Font, orientation: FontOrientation, glyphs: []const graphics.Glyph, @@ -197,11 +197,11 @@ test { // Bounding rect { - var rect = font.getBoundingRectForGlyphs(.horizontal, &glyphs, null); + var rect = font.getBoundingRectsForGlyphs(.horizontal, &glyphs, null); try testing.expect(rect.size.width > 0); var singles: [1]graphics.Rect = undefined; - rect = font.getBoundingRectForGlyphs(.horizontal, &glyphs, &singles); + rect = font.getBoundingRectsForGlyphs(.horizontal, &glyphs, &singles); try testing.expect(rect.size.width > 0); try testing.expect(singles[0].size.width > 0); } diff --git a/src/font/face/coretext.zig b/src/font/face/coretext.zig index e3177e888..7e305f968 100644 --- a/src/font/face/coretext.zig +++ b/src/font/face/coretext.zig @@ -242,7 +242,7 @@ pub const Face = struct { var glyphs = [_]macos.graphics.Glyph{@intCast(glyph_index)}; // Get the bounding rect for rendering this glyph. - const rect = self.font.getBoundingRectForGlyphs(.horizontal, &glyphs, null); + const rect = self.font.getBoundingRectsForGlyphs(.horizontal, &glyphs, null); // The x/y that we render the glyph at. The Y value has to be flipped // because our coordinates in 3D space are (0, 0) bottom left with