diff options
| author | Jules Aguillon | 2025-01-03 15:50:30 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2025-01-03 15:50:30 +0100 |
| commit | 6ce21952532ad5878fd2fbd5bfa16c8300015d01 (patch) | |
| tree | 9572673cceee26802c6df0d046a72b606895d89b | |
| parent | 9ba718694b56a757f50c7160957e8aa2b296b324 (diff) | |
| download | unexpected-keyboard-6ce21952532ad5878fd2fbd5bfa16c8300015d01.tar.gz unexpected-keyboard-6ce21952532ad5878fd2fbd5bfa16c8300015d01.zip | |
Add glyphs for zwj and zwnj
Co-authored-by: @srikanban
| -rw-r--r-- | assets/special_font.ttf | bin | 20388 -> 20792 bytes | |||
| -rw-r--r-- | srcs/juloo.keyboard2/KeyValue.java | 8 | ||||
| -rw-r--r-- | srcs/special_font/018.svg | 36 | ||||
| -rw-r--r-- | srcs/special_font/019.svg | 36 |
4 files changed, 76 insertions, 4 deletions
diff --git a/assets/special_font.ttf b/assets/special_font.ttf Binary files differindex 73f642b..6da9c47 100644 --- a/assets/special_font.ttf +++ b/assets/special_font.ttf diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java index c6778c9..7c75316 100644 --- a/srcs/juloo.keyboard2/KeyValue.java +++ b/srcs/juloo.keyboard2/KeyValue.java @@ -315,7 +315,7 @@ public final class KeyValue implements Comparable<KeyValue> private static KeyValue charKey(int symbol, char c, int flags) { - return charKey(String.valueOf((char)symbol), c, flags); + return charKey(String.valueOf((char)symbol), c, flags | FLAG_KEY_FONT); } private static KeyValue modifierKey(String symbol, Modifier m, int flags) @@ -628,7 +628,7 @@ public final class KeyValue implements Comparable<KeyValue> /* Spaces */ case "\\t": return charKey("\\t", '\t', 0); // Send the tab character case "\\n": return charKey("\\n", '\n', 0); // Send the newline character - case "space": return charKey(0xE00D, ' ', FLAG_KEY_FONT | FLAG_SMALLER_FONT | FLAG_GREYED); + case "space": return charKey(0xE00D, ' ', FLAG_SMALLER_FONT | FLAG_GREYED); case "nbsp": return charKey("\u237d", '\u00a0', FLAG_SMALLER_FONT); case "nnbsp": return charKey("\u2423", '\u202F', FLAG_SMALLER_FONT); @@ -672,9 +672,9 @@ public final class KeyValue implements Comparable<KeyValue> case "meteg": return charKey("\u05DE\u05BD", '\u05BD', 0); // or siluq or sof-pasuq case "meteg_placeholder": return placeholderKey(Placeholder.METEG); /* intending/preventing ligature - supported by many scripts*/ - case "zwj": return charKey("zwj", '\u200D', 0); // zero-width joiner (provides ligature) + case "zwj": return charKey(0xE019, '\u200D', 0); // zero-width joiner (provides ligature) case "zwnj": - case "halfspace": return charKey("βΈ½", '\u200C', 0); // zero-width non joiner + case "halfspace": return charKey(0xE018, '\u200C', 0); // zero-width non joiner /* Editing keys */ case "copy": return editingKey(0xE030, Editing.COPY); diff --git a/srcs/special_font/018.svg b/srcs/special_font/018.svg new file mode 100644 index 0000000..4e5e024 --- /dev/null +++ b/srcs/special_font/018.svg @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="251.2084" + height="346.34631" + viewBox="0 0 251.2084 346.34631" + id="svg50" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs50" /> + <path + d="m 111.45948,263.67139 -0.65968,70.83632 26.479,0.0651 0.65968,-70.83632 z" + id="path53" + style="stroke-width:1.25499" /> + <path + d="m 111.87085,177.09327 -0.65625,70.83632 26.47901,0.0651 0.65625,-70.83632 z" + style="stroke-width:1.25499" + id="path52" /> + <path + d="m 112.28491,90.517092 -0.65625,70.836328 26.47901,0.0651 0.65625,-70.836323 z" + id="path51" + style="stroke-width:1.25499" /> + <path + d="m 112.69897,3.9389651 -0.65625,70.8363279 26.47901,0.06504 0.65625,-70.8363283 z" + id="path50" + style="stroke-width:1.25499" /> + <path + id="path18" + style="fill:#000000;fill-opacity:1;stroke-linejoin:miter" + d="m 65.820312,83.498047 c -4.593515,0.215306 -6.152677,5.268685 -8.898203,8.213199 C 38.278151,116.62976 19.634192,141.54828 0.99023438,166.4668 c -2.83750458,4.46126 1.03756942,8.71774 3.73179282,12.07004 19.1846708,24.78419 38.2012768,49.71196 57.4908638,74.40652 3.198651,3.27254 9.151508,0.0604 8.39063,-4.39354 -0.03125,-53.23977 0.06249,-106.48588 -0.04687,-159.721695 0.24461,-2.714275 -2.014228,-5.25621 -4.736339,-5.330078 z" /> + <path + id="path19" + style="fill:#000000;fill-opacity:1;stroke-linejoin:miter" + d="m 185.38672,83.498047 c -5.14905,0.277288 -4.93792,6.038398 -4.78323,9.856942 0.0195,52.075841 -0.0391,104.155561 0.0293,156.228991 0.0165,4.63683 6.78367,6.42764 9.15539,2.46706 20.15696,-26.20997 40.46312,-52.31451 60.52686,-78.59034 2.188,-3.88246 -0.2104,-7.62612 -2.75553,-10.54349 -19.30825,-25.80639 -38.61649,-51.61277 -57.92474,-77.419163 -0.96774,-1.321423 -2.61948,-2.087177 -4.24805,-2 z" /> +</svg> diff --git a/srcs/special_font/019.svg b/srcs/special_font/019.svg new file mode 100644 index 0000000..b83440b --- /dev/null +++ b/srcs/special_font/019.svg @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="258.20947" + height="330.63379" + viewBox="0 0 258.20947 330.63379" + id="svg50" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs50" /> + <path + d="m 114.99631,259.7326 -0.65625,70.8362 26.47901,0.065 0.65625,-70.8364 z" + style="stroke-width:1.25499" + id="path53" /> + <path + d="m 115.4111,173.1544 -0.65966,70.8363 26.47901,0.065 0.65966,-70.8363 z" + style="stroke-width:1.25499" + id="path52" /> + <path + d="m 115.82516,86.57631 -0.65966,70.83629 26.47901,0.065 0.65966,-70.83629 z" + style="stroke-width:1.25499" + id="path51" /> + <path + d="m 116.23924,0 -0.65968,70.83631 26.479,0.063 0.65968,-70.8363 z" + style="stroke-width:1.25499" + id="path50" /> + <path + id="path43" + style="fill:#000000;fill-opacity:1;stroke-linejoin:miter" + d="m 6.3793735,79.95371 c -4.91171,-0.117 -6.96523998,4.5372 -6.23632998,8.7416 0.0169,52.30119 -0.0339,104.60579 0.0254,156.90489 -0.004,4.8047 7.01418998,6.4658 9.32575998,2.3238 21.4081905,-26.4719 42.9958305,-52.8314 64.2914205,-79.3739 1.89802,-4.4107 -2.77165,-7.4685 -4.82563,-10.8076 -19.43572,-25.2809 -38.87144,-50.5619 -58.30716,-75.84279 -0.9851505,-1.3076 -2.6435405,-2.0564 -4.2734605,-1.946 z" /> + <path + id="path44" + style="fill:#000000;fill-opacity:1;stroke-linejoin:miter" + d="m 251.90671,79.95371 c -4.60754,0.1655 -6.23591,5.2156 -9.03067,8.1332 -19.42905,25.37169 -39.0573,50.60479 -58.36179,76.06309 -2.00684,4.4938 2.93232,7.4651 5.07245,10.7946 20.08843,24.6814 40.02595,49.4983 60.20868,74.0951 3.21461,3.2216 9.10409,-0.01 8.34768,-4.4336 0,-53.0855 0,-106.1711 0,-159.25659 0.0923,-3.5089 -3.25795,-5.067 -6.23635,-5.3958 z" /> +</svg> |
