aboutsummaryrefslogtreecommitdiff
path: root/gen/string
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-05-15 00:43:01 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-05-15 00:43:01 +0200
commitd7ba894d2af0e0c5a8d5db9cbadd7ea9a277100b (patch)
tree93008027aae50734b3fa4ecc76861d4ae5c47bb3 /gen/string
parent1659bd6b378accb07d3a520dfff38750411903a0 (diff)
Support NFD & NFKD scale detection… sort of
Diffstat (limited to 'gen/string')
-rwxr-xr-xgen/string/scale-norm.c6
1 files changed, 5 insertions, 1 deletions
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);