From 0e55f4054e28faa348aaa2a03351c1efcf782ef8 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 27 Nov 2022 20:25:09 -0800 Subject: [PATCH] font: Shaper should replace 0 with 0x20 (space) This didn't cause any real problems but it was a waste to trigger the full font fallback system for codepoint 0. --- src/font/Shaper.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/font/Shaper.zig b/src/font/Shaper.zig index 051758918..d6e38576c 100644 --- a/src/font/Shaper.zig +++ b/src/font/Shaper.zig @@ -182,7 +182,7 @@ pub const RunIterator = struct { // for unknown glyphs. const font_idx_opt = (try self.group.indexForCodepoint( alloc, - if (cell.empty()) ' ' else cell.char, + if (cell.empty() or cell.char == 0) ' ' else cell.char, style, presentation, )) orelse (try self.group.indexForCodepoint(