From 96656614454f96034d9cc0f0e14c76493b5b7c6b Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 24 Jun 2024 21:18:37 +0200 Subject: vt: only apply VS-15/16 to valid sequences At compile time, build a lookup table from the Unicode data file 'emoji-variation-sequences.txt'. At run-time, when we detect a VS-15/16 sequence, do a lookup in this table, and enforce the variation selector iff the sequence is valid. Closes #1742 --- meson.build | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index cb5d4741..b2e2929b 100644 --- a/meson.build +++ b/meson.build @@ -199,6 +199,14 @@ builtin_terminfo = custom_target( '@default_terminfo@', foot_terminfo, 'foot', '@OUTPUT@'] ) +generate_emoji_variation_sequences = files('scripts/generate-emoji-variation-sequences.py') +emoji_variation_sequences = custom_target( + 'generate_emoji_variation_sequences', + input: 'unicode/emoji-variation-sequences.txt', + output: 'emoji-variation-sequences.h', + command: [python, generate_emoji_variation_sequences, '@INPUT@', '@OUTPUT@'] +) + common = static_library( 'common', 'log.c', 'log.h', @@ -227,7 +235,8 @@ vtlib = static_library( 'osc.c', 'osc.h', 'sixel.c', 'sixel.h', 'vt.c', 'vt.h', - builtin_terminfo, wl_proto_src + wl_proto_headers, + builtin_terminfo, emoji_variation_sequences, + wl_proto_src + wl_proto_headers, version, dependencies: [libepoll, pixman, fcft, tllist, wayland_client, xkb, utf8proc], link_with: [common, misc], -- cgit v1.3