Fix incorrect rendering of some symbols when followed by a space while using the PowerLine font which does not have a space glyph

Fixes #1225
This commit is contained in:
Kovid Goyal 2019-09-14 17:56:52 +05:30
parent 7fe63a7aad
commit dcfd2b8d60
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 8 additions and 2 deletions

View File

@ -19,6 +19,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- Allow mapping keys commonly found on European keyboards (:pull:`1928`) - Allow mapping keys commonly found on European keyboards (:pull:`1928`)
- Fix incorrect rendering of some symbols when followed by a space while using
the PowerLine font which does not have a space glyph (:iss:`1225`)
0.14.4 [2019-08-31] 0.14.4 [2019-08-31]
--------------------- ---------------------

View File

@ -955,8 +955,11 @@ merge_groups_for_pua_space_ligature(void) {
while (G(group_idx) > 0) { while (G(group_idx) > 0) {
Group *g = G(groups), *g1 = G(groups) + 1; Group *g = G(groups), *g1 = G(groups) + 1;
g->num_cells += g1->num_cells; g->num_cells += g1->num_cells;
g->num_glyphs += g1->num_glyphs; // We dont want the space glyphs rendered because some stupid
g->num_glyphs = MIN(g->num_glyphs, MAX_NUM_EXTRA_GLYPHS + 1); // fonts like PowerLine dont have a space glyph
// https://github.com/kovidgoyal/kitty/issues/1225
/* g->num_glyphs += g1->num_glyphs; */
/* g->num_glyphs = MIN(g->num_glyphs, MAX_NUM_EXTRA_GLYPHS + 1); */
G(group_idx)--; G(group_idx)--;
} }
} }