mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-27 07:58:07 -04:00
wip: grapheme shaping
This commit is contained in:
parent
c1cde66f70
commit
b9ef703eb1
16 changed files with 340 additions and 178 deletions
17
terminal.h
17
terminal.h
|
|
@ -8,6 +8,10 @@
|
|||
#include <threads.h>
|
||||
#include <semaphore.h>
|
||||
|
||||
#if defined(FOOT_GRAPHEME_CLUSTERING)
|
||||
#include <utf8proc.h>
|
||||
#endif
|
||||
|
||||
#include <tllist.h>
|
||||
#include <fcft/fcft.h>
|
||||
|
||||
|
|
@ -81,8 +85,7 @@ struct damage {
|
|||
};
|
||||
|
||||
struct composed {
|
||||
wchar_t base;
|
||||
wchar_t combining[5];
|
||||
wchar_t chars[20];
|
||||
uint8_t count;
|
||||
};
|
||||
|
||||
|
|
@ -152,6 +155,9 @@ struct vt_param {
|
|||
struct vt {
|
||||
int state; /* enum state */
|
||||
wchar_t last_printed;
|
||||
#if defined(FOOT_GRAPHEME_CLUSTERING)
|
||||
utf8proc_int32_t grapheme_state;
|
||||
#endif
|
||||
wchar_t utf8;
|
||||
struct {
|
||||
struct vt_param v[16];
|
||||
|
|
@ -720,3 +726,10 @@ void term_collect_urls(struct terminal *term);
|
|||
|
||||
void term_osc8_open(struct terminal *term, uint64_t id, const char *uri);
|
||||
void term_osc8_close(struct terminal *term);
|
||||
|
||||
static inline void term_reset_grapheme_state(struct terminal *term)
|
||||
{
|
||||
#if defined(FOOT_GRAPHEME_CLUSTERING)
|
||||
term->vt.grapheme_state = 0;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue