From 3e76cf87ce39ced3e1f7c83987d1720a281c45fd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 5 Jan 2021 09:35:21 +0530 Subject: [PATCH] Linux: Fix rendering of emoji followed by the graphics variation selector not being colored with some fonts Harfbuzz, for some reason has started rendering variation selector glyphs. These fail to load for some fonts. https://github.com/harfbuzz/harfbuzz/issues/2804 Fixes #3211 --- docs/changelog.rst | 3 +++ kitty/freetype.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 540d4d259..a1036f708 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -19,6 +19,9 @@ To update |kitty|, :doc:`follow the instructions `. - Double clicking on empty tab bar area now opens a new tab (:iss:`3201`) +- Linux: Fix rendering of emoji followed by the graphics variation selector not + being colored with some fonts (:iss:`3211`) + 0.19.3 [2020-12-19] ------------------- diff --git a/kitty/freetype.c b/kitty/freetype.c index fe2a788b4..067bfed48 100644 --- a/kitty/freetype.c +++ b/kitty/freetype.c @@ -592,11 +592,11 @@ render_glyphs_in_cells(PyObject *f, bool bold, bool italic, hb_glyph_info_t *inf if (*was_colored) { if (!render_color_bitmap(self, info[i].codepoint, &bm, cell_width, cell_height, num_cells, baseline)) { if (PyErr_Occurred()) PyErr_Print(); - *was_colored = false; if (!render_bitmap(self, info[i].codepoint, &bm, cell_width, cell_height, num_cells, bold, italic, true, fg)) { free_processed_bitmap(&bm); return false; } + *was_colored = false; } } else { if (!render_bitmap(self, info[i].codepoint, &bm, cell_width, cell_height, num_cells, bold, italic, true, fg)) {