From 04e4b0c469733f04c51e3de5ad93a51454465979 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 13 May 2019 20:52:14 +0530 Subject: [PATCH] Fix rendering of text containing the VS15 variation selector Fixes #1611 --- kitty/fonts.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kitty/fonts.c b/kitty/fonts.c index 80ff6bd28..ee9b01042 100644 --- a/kitty/fonts.c +++ b/kitty/fonts.c @@ -804,9 +804,12 @@ check_cell_consumed(CellData *cell_data, CPUCell *last_cpu_cell) { case 0: cell_data->current_codepoint = cell_data->cpu_cell->ch; break; - default: - cell_data->current_codepoint = codepoint_for_mark(cell_data->cpu_cell->cc_idx[cell_data->codepoints_consumed - 1]); + default: { + index_type mark = cell_data->cpu_cell->cc_idx[cell_data->codepoints_consumed - 1]; + // VS15 causes rendering to break, so map it to 0 + cell_data->current_codepoint = (mark == VS15 || mark == VS16) ? 0 : codepoint_for_mark(mark); break; + } } } return 0;