From d7ba894d2af0e0c5a8d5db9cbadd7ea9a277100b Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 15 May 2024 00:43:01 +0200 Subject: Support NFD & NFKD scale detection… sort of MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gen/string/scale-norm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gen/string/scale-norm.c b/gen/string/scale-norm.c index 2b926fa..148f0a3 100755 --- a/gen/string/scale-norm.c +++ b/gen/string/scale-norm.c @@ -26,7 +26,7 @@ main(void) double n = scale(ch); maxscale = MAX(n, maxscale); } - printf("NFD\t%g\n", maxscale); + printf("%g\n", maxscale); } double @@ -43,7 +43,11 @@ scale2(rune ch) { if (uprop_get_hst(ch) != HST_NA) return hscnt(ch); +#if 0 /* NFKD */ + if (uprop_get_dt(ch) == DT_NONE) +#elif 1 /* NFD */ if (uprop_get_dt(ch) != DT_CAN) +#endif return bcnt(ch); int acc = 0; struct rview rv = uprop_get_dm(ch); -- cgit v1.2.3