Fix typo.

This commit is contained in:
Gordon Cassie
2024-04-24 21:07:50 -07:00
committed by Mitchell Hashimoto
parent 9d91ab7837
commit abd782a7aa
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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