wip: grapheme shaping

This commit is contained in:
Daniel Eklöf 2020-08-20 19:25:35 +02:00
parent c1cde66f70
commit b9ef703eb1
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
16 changed files with 340 additions and 178 deletions

8
util.h
View file

@ -35,3 +35,11 @@ sdbm_hash(const char *s)
return hash;
}
#include <wchar.h>
static inline int
my_wcswidth(const wchar_t *s, size_t n)
{
int ret = wcswidth(s, n);
return max(0, ret);
}