latin: xerox unistrokes svg row
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 12 Apr 2017 10:32:07 +0000 (12:32 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 22 May 2017 15:55:29 +0000 (17:55 +0200)
Stroke data from <http://www.yorku.ca/mack/chi2008b.html>.

latin.plp
writing-latn.inc.pl

index b79e33abf483348b10384300169369f77c40ac64..bbd256b959591f0f635e252aa2116faeab15081c 100644 (file)
--- a/latin.plp
+++ b/latin.plp
@@ -89,6 +89,10 @@ Html({
                padding: 0.1em;
                margin-right: 0.2em;
        }
                padding: 0.1em;
                margin-right: 0.2em;
        }
+       #unistrokes svg path {
+               stroke-linecap: round;
+               stroke-linejoin: round;
+       }
 
        svg path:not([fill]) {
                stroke: currentColor;
 
        svg path:not([fill]) {
                stroke: currentColor;
index 6adf33b8f5713a4740bd584974aaabd0c40eb310..3a284b214d543ea857c0b2c8b791a877a5b4c39f 100644 (file)
@@ -77,6 +77,41 @@ sub dispbar {
        806a9c    89Aa9c    800a9c945aaa
        0         965aa6
 }],
        806a9c    89Aa9c    800a9c945aaa
        0         965aa6
 }],
+'Unistrokes' => [
+       map { '<svg width="14" height="16" viewBox="-1 -1 8 10">'.$_.'</svg>' }
+       map {
+               sprintf('<circle cx="%s" cy="%s" r="1"/>', m/\AM(\d+),(\d+)(.?)/) . # start point
+               (!!$3 && qq(<path d="$_"/>))
+       }
+       'M3,8 V0',
+       'M0,0 6,4 0,8',
+       'M6,0 0,4 6,8',
+       'M6,0 0,4 6,8',
+       'M6,4 H0',
+       'M6,0 0,0 0,8',
+       'M0,8 6,8 6,0',
+       'M0,0 6,0 6,8',
+       'M3,0 V8',
+       'M6,0 6,8 0,8',
+       'M0,8 6,0',
+       'M0,0 0,8 6,8',
+       'M6,8 3,0 0,8',
+       'M0,8 3,0 6,8',
+       'M6,0 Q0,6 3,8 6,6 0,0',
+       'M0,0 Q4,8 6,4 4,0 0,8',
+       'M6,0 Q2,8 0,4 2,0 6,8',
+       'M0,0 6,8',
+       'M6,0 0,0 6,8 0,8',
+       'M0,4 H6',
+       'M6,0 3,8 0,0',
+       'M0,0 3,8 6,0',
+       'M0,0 0,8 6,0 6,8',
+       'M0,0 Q6,6 3,8 0,6 6,0',
+       'M6,0 0,8',
+       'M0,0 6,0 0,8 6,8',
+       'M3,4',
+],
+# 'Palm Graffiti' => [
 '<abbr title="International Telegraph Alphabet">ITA</abbr>2' => [
        map { tr/01/○●/r =~ s/..\K/ /r } qw(
        11000 10011 01110 10010 10000 10110 01011 00101 01100 11010 11110 01001 00111
 '<abbr title="International Telegraph Alphabet">ITA</abbr>2' => [
        map { tr/01/○●/r =~ s/..\K/ /r } qw(
        11000 10011 01110 10010 10000 10110 01011 00101 01100 11010 11110 01001 00111