diff --git i/admin/unidata/emoji-zwj.awk w/admin/unidata/emoji-zwj.awk index 3d605d5d64..331095d56f 100644 --- i/admin/unidata/emoji-zwj.awk +++ w/admin/unidata/emoji-zwj.awk @@ -69,6 +69,7 @@ END { # emoji sequences. We have code in font.c:font_range that will # try to display them with the emoji font anyway. + trigger_codepoints[0] = "20E3" trigger_codepoints[1] = "261D" trigger_codepoints[2] = "26F9" trigger_codepoints[3] = "270C" diff --git i/src/font.c w/src/font.c index 7e0219181c..265bec6ce5 100644 --- i/src/font.c +++ w/src/font.c @@ -3937,6 +3937,14 @@ codepoint_is_emoji_eligible (int ch) return false; } +static bool +codepoint_is_combining_lookup_eligible (int ch) +{ + if ((0x20D0 <= ch && ch <= 0x20FF) || ch == 0x308) + return true; + return false; +} + /* Check how many characters after character/byte position POS/POS_BYTE (at most to *LIMIT) can be displayed by the same font in the window W. FACE, if non-NULL, is the face selected for the character at POS. @@ -3996,6 +4004,13 @@ font_range (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t *limit, val = AREF (val, 0); font_object = font_for_char (face, XFIXNAT (val), pos, string); } + } else if (codepoint_is_combining_lookup_eligible (ch)) + /* If the triggering codepoint is a combining character, use the + font of that character rather than the font of the base + character, since that increases the chances of composition + working. */ + { + font_object = font_for_char (face, ch, pos, string); } while (pos < *limit)