mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 14:04:52 +02:00
When the OS returns a fallback font that does not actually contain glyphs for the text, do not exhaust the list of fallback fonts
Fixes #1918 Apparently fontconfig does this for Tangut components.
This commit is contained in:
@@ -33,6 +33,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||||||
|
|
||||||
- Fix piping PNG images into the icat kitten not working (:iss:`1920`)
|
- Fix piping PNG images into the icat kitten not working (:iss:`1920`)
|
||||||
|
|
||||||
|
- When the OS returns a fallback font that does not actually contain glyphs
|
||||||
|
for the text, do not exhaust the list of fallback fonts (:iss:`1918`)
|
||||||
|
|
||||||
|
|
||||||
0.14.3 [2019-07-29]
|
0.14.3 [2019-07-29]
|
||||||
---------------------
|
---------------------
|
||||||
|
|||||||
@@ -497,6 +497,20 @@ load_fallback_font(FontGroup *fg, CPUCell *cell, bool bold, bool italic, bool em
|
|||||||
Font *af = &fg->fonts[ans];
|
Font *af = &fg->fonts[ans];
|
||||||
if (!init_font(af, face, bold, italic, emoji_presentation)) fatal("Out of memory");
|
if (!init_font(af, face, bold, italic, emoji_presentation)) fatal("Out of memory");
|
||||||
Py_DECREF(face);
|
Py_DECREF(face);
|
||||||
|
if (!has_cell_text(af, cell)) {
|
||||||
|
if (global_state.debug_font_fallback) {
|
||||||
|
printf("The font chosen by the OS for the text: ");
|
||||||
|
printf("U+%x ", cell->ch);
|
||||||
|
for (unsigned i = 0; i < arraysz(cell->cc_idx) && cell->cc_idx[i]; i++) {
|
||||||
|
printf("U+%x ", codepoint_for_mark(cell->cc_idx[i]));
|
||||||
|
}
|
||||||
|
printf("is ");
|
||||||
|
PyObject_Print(af->face, stdout, 0);
|
||||||
|
printf(" but it does not actually contain glyphs for that text\n");
|
||||||
|
}
|
||||||
|
del_font(af);
|
||||||
|
return MISSING_FONT;
|
||||||
|
}
|
||||||
fg->fallback_fonts_count++;
|
fg->fallback_fonts_count++;
|
||||||
fg->fonts_count++;
|
fg->fonts_count++;
|
||||||
return ans;
|
return ans;
|
||||||
|
|||||||
Reference in New Issue
Block a user