From 22a0869525f20ba6bc54f4b8f5c36077e35ab660 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 11 Dec 2023 11:06:15 -0800 Subject: [PATCH] font/shaper: if char is 0, should send space to shaper --- src/font/shaper/run.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/font/shaper/run.zig b/src/font/shaper/run.zig index 7bc56e2e9..093ffaebe 100644 --- a/src/font/shaper/run.zig +++ b/src/font/shaper/run.zig @@ -209,7 +209,10 @@ pub const RunIterator = struct { } // Add all the codepoints for our grapheme - try self.hooks.addCodepoint(cell.char, @intCast(cluster)); + try self.hooks.addCodepoint( + if (cell.char == 0) ' ' else cell.char, + @intCast(cluster), + ); if (cell.attrs.grapheme) { var it = self.row.codepointIterator(j); while (it.next()) |cp| {