mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-11 08:21:01 -04:00
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
This commit is contained in:
parent
94583703e1
commit
9665661445
5 changed files with 903 additions and 6 deletions
11
meson.build
11
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],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue