aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-05-03 09:03:22 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-05-03 09:03:22 +0000
commit62e07743194c8051334ed9b23be90ce31ab80773 (patch)
tree482e8e9182b4ae25a602ceb7c688ed3f3c51c2df /scripts
parentosc: fix scaling of RGB formatted color specifiers (diff)
unicode-combining: store seen combining chains "globally" in the term struct
Instead of storing combining data per cell, realize that most combinations are re-occurring and that there's lots of available space left in the unicode range, and store seen base+combining combinations chains in a per-terminal array. When we encounter a combining character, we first try to pre-compose, like before. If that fails, we then search for the current base+combining combo in the list of previously seen combinations. If not found there either, we allocate a new combo and add it to the list. Regardless, the result is an index into this array. We store this index, offsetted by COMB_CHARS_LO=0x40000000ul in the cell. When rendering, we need to check if the cell character is a plain character, or if it's a composed character (identified by checking if the cell character is >= COMB_CHARS_LO). Then we render the grapheme pretty much like before.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions