summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorRobert Pluim <rpluim@gmail.com>2021-09-26 17:26:22 +0200
committerRobert Pluim <rpluim@gmail.com>2021-09-27 10:31:32 +0200
commita2a62f71051f1295492780f320e9b7bc02b6e6f4 (patch)
tree79212dd1c9b038c7779dc7edbd2760fb8ad2514c /admin
parentda4e58458f6659d075143083a9f04be3a42853da (diff)
downloademacs-a2a62f71051f1295492780f320e9b7bc02b6e6f4.tar.gz
Enhance font_range to check for emoji composition triggers
If the codepoint that triggered composition is from the emoji script, use the emoji font to check the string being composed, rather than the font of the first character of the string. This makes e.g. "emoji codepoint with Emoji_Presentation = No followed by VS-16 (FE0F)" display the emoji version of the glyph for that codepoint. * admin/unidata/blocks.awk: Add VS-1 through VS-16 to the emoji script. * src/composite.c (autocmp_chars): Accept additional argument CH for the codepoint that triggered composition, pass it to font_range. (composition_reseat_it, find_automatic_composition): Pass codepoint that triggered composition to autocmp_chars. * src/font.c (font_range): Accept additional argument CH for the triggering codepoint. If the codepoint is from the 'emoji' script, use Vscript_representative_chars to find the font to use for the composition attempt. (syms_of_font): Add Qemoji symbol. * src/font.h: Update font_range prototype for argument CH. * etc/NEWS: Announce change.
Diffstat (limited to 'admin')
-rwxr-xr-xadmin/unidata/blocks.awk6
1 files changed, 6 insertions, 0 deletions
diff --git a/admin/unidata/blocks.awk b/admin/unidata/blocks.awk
index b0303d7e669..96b0413875d 100755
--- a/admin/unidata/blocks.awk
+++ b/admin/unidata/blocks.awk
@@ -243,6 +243,12 @@ END {
override_start[idx] = "1F590"
override_end[idx] = "1F590"
+ ## These are here so that font_range can choose Emoji presentation
+ ## for the preceding codepoint when it encounters a VS
+ idx++
+ override_start[idx] = "FE00"
+ override_end[idx] = "FE0F"
+
for (k in override_start)
{
i++