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.
This commit is contained in:
Mitchell Hashimoto
2022-11-27 20:25:09 -08:00
parent ddaed26f10
commit 0e55f4054e

View File

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