aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-05-03 09:36:20 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-05-03 09:36:20 +0000
commit1d1eb899257a98db81d2cd3a634135b60ba0d0ba (patch)
tree14d141ed96f7e47a6adb6102a0ab1626cd125a29 /terminal.h
parentosc: fix scaling of RGB formatted color specifiers (diff)
parentunicode-combining: limit maximum number of allowed composed chains (diff)
Merge branch 'space-optimize-combining-chars'
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/terminal.h b/terminal.h
index 2292e927..395557db 100644
--- a/terminal.h
+++ b/terminal.h
@@ -77,21 +77,16 @@ struct damage {
int lines;
};
-#if FOOT_UNICODE_MAX_COMBINING_CHARS > 0
-struct combining_chars {
+struct composed {
+ wchar_t base;
+ wchar_t combining[5];
uint8_t count;
- wchar_t chars[FOOT_UNICODE_MAX_COMBINING_CHARS];
-} __attribute__((packed));
-#endif
+};
struct row {
struct cell *cells;
bool dirty;
bool linebreak;
-
-#if FOOT_UNICODE_MAX_COMBINING_CHARS > 0
- struct combining_chars *comb_chars;
-#endif
};
struct sixel {
@@ -221,6 +216,11 @@ struct terminal {
struct grid alt;
struct grid *grid;
+ #define COMB_CHARS_LO 0x40000000ul
+ #define COMB_CHARS_HI 0x400ffffful
+ size_t composed_count;
+ struct composed *composed;
+
struct fcft_font *fonts[4];
int font_dpi;
int font_adjustments;