aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-05-02 15:29:00 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-05-02 15:29:00 +0000
commitd945b68b734427a03d114716ff8aeac7998a7c57 (patch)
tree93c73c5ab615ccf66244713d15a2a7a2fd139e0d /meson.build
parentunicode-combining: don't limit ourselves to the (western) diacritics blocks (diff)
unicode-combine: remove utf8proc dependency
We only used utf8proc to try to pre-compose a glyph from a base and combining character. We can do this ourselves by using a pre-compiled table of valid pre-compositions. This table isn't _that_ big, and binary searching it is fast. That is, for a very small amount of code, and not too much extra RO data, we can get rid of the utf8proc dependency.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 7 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index 7703af54..38d86d4d 100644
--- a/meson.build
+++ b/meson.build
@@ -57,8 +57,10 @@ wayland_client = dependency('wayland-client')
wayland_cursor = dependency('wayland-cursor')
xkb = dependency('xkbcommon')
-utf8proc = dependency('libutf8proc', required: get_option('unicode-combining'))
-add_project_arguments('-DFOOT_UNICODE_COMBINING=@0@'.format(utf8proc.found()), language: 'c')
+add_project_arguments('-DFOOT_UNICODE_MAX_COMBINING_CHARS=@0@'.format(
+ get_option('unicode-max-combining-chars')), language: 'c')
+add_project_arguments('-DFOOT_UNICODE_PRECOMPOSE=@0@'.format(
+ get_option('unicode-precompose')), language: 'c')
tllist = dependency('tllist', version: '>=1.0.1', fallback: 'tllist')
fcft = dependency('fcft', version: ['>=2.0.0', '<2.1.0'], fallback: 'fcft')
@@ -128,8 +130,7 @@ executable(
'vt.c', 'vt.h',
'wayland.c', 'wayland.h',
wl_proto_src + wl_proto_headers, version,
- dependencies: [math, threads, pixman, wayland_client, wayland_cursor, xkb, utf8proc,
- tllist, fcft],
+ dependencies: [math, threads, pixman, wayland_client, wayland_cursor, xkb, tllist, fcft],
install: true)
executable(
@@ -154,7 +155,8 @@ subdir('doc')
summary(
{
- 'Unicode combining': utf8proc.found(),
+ 'Unicode max combining chars': get_option('unicode-max-combining-chars'),
+ 'Unicode precompose': get_option('unicode-precompose'),
},
bool_yn: true
)