Skip to content

Commit c6b99c9

Browse files
fix(scene): typos
1 parent e5fe9d6 commit c6b99c9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/phantom/scene/backends/fb.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub const NodeText = @import("../nodes/text.zig").NodeText(struct {
8383
.destOffset = origin.add(startPos).add(.{
8484
glyph.bearing.value[0],
8585
-glyph.bearing.value[1],
86-
}),
86+
}).cast(usize),
8787
.size = glyph.size,
8888
});
8989

src/phantom/scene/nodes/text.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub fn NodeText(comptime Impl: type) type {
8888
}
8989

9090
fn calcSize(self: *Self) !vizops.vector.UsizeVector2 {
91-
var viewIter = self.option.view.iterator();
91+
var viewIter = self.options.view.iterator();
9292

9393
var width: usize = 0;
9494
var yMaxMin = vizops.vector.UsizeVector2.zero();
@@ -164,7 +164,7 @@ pub fn NodeText(comptime Impl: type) type {
164164
var output = std.ArrayList(u8).init(self.node.allocator);
165165
errdefer output.deinit();
166166

167-
try output.writer().print("{{ .font = {}, .text = \"{s}\" }}", .{ self.options.font, self.options.text });
167+
try output.writer().print("{{ .font = {}, .text = \"{}\" }}", .{ self.options.font, std.unicode.fmtUtf8(self.options.view.bytes) });
168168
return output;
169169
}
170170
};

0 commit comments

Comments
 (0)