sub disptap {
return map {
m/\A(-?)(\d)(\d)/;
- sprintf('<small style="line-height:2ex">%s</small> ',
- #TODO: prepend $1
- join "<br>\n", '•' x $2, '•' x $3,
+ sprintf('<td style="line-height:1ex"%s>%s<br>%s</td>',
+ ' class=ex' x !!$1,
+ '·' x $2, '·' x $3,
);
} @_;
}
'Uppercase' => [qw{ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z }],
'Lowercase' => [qw{ a b c d e f g h i j k l m n o p q r s t u v w x y z }],
'Sütterlin' => [qw{ a b c d e f g h i j k l m n o p q r ſ s t u v w x y z }],
-'<abbr title="American Sign Lanugage">ASL</abbr>' => [
+'Sutton <abbr title="American Sign Lanugage">ASL</abbr>' => [
# American manual alphabet in Sutton (U+1D800+) notation
map { pack 'W*', map { hex "1D$_" } unpack '(A3)*', $_ } qw{
8F7a9c 847a9c 86Da9c 801a9c 84Aa9c
33 34 35 41 42 43 44 45 51 52 53 54 55
})],
'Tap simplified' => [disptap(qw{
- 11 12 13 14 21 22 23 24 31 -31 -13 32 33
- 34 41 42 -13 43 44 15 51 52 53 -25 -31 54
+ 11 12 13 14 21 22 23 20 31 -31 -13 32 33
+ 30 41 42 -13 43 40 10 51 52 53 50 -31 -40
})],
'Maritime flags' => [
# International Code of Signals, SVG fills
local $_ = $_;
s/[1-4]\K(?=[4-9])/ /;
tr/1-9/↙←↖↑↗→↘↓/;
- s{(\S)(?=.)}{<span style="position:absolute">$1</span>}
- or s/^/<span>/ and $_ .= '</span>';
+ s{(\S)(?=.)}{<span style="position:absolute">$1</span>};
$_
}
qw(
201112 102112 202111 101212 201211 102211
)
],
+'Code 128' => [
+ map { tr/1-3-/❘❙❚ /r }
+ # bar widths (1-3) followed by space of width 1 (implied) or 3 (-)
+ qw(
+ 11-2 1-12 1-1-2 12-1 1-21 1-2-1 21-1 2-11 2-1-1 123 12-3 1-23 132
+ 13-2 1-32 332 21-3 2-13 231 23-1 233 312 31-2 3-12 321 32-1
+ )
+],
'<abbr title="Royal Mail 4-State Customer Code">RM4SCC</abbr>' => [
map { sprintf
'<svg width="20" height="20" viewBox="0 0 8 6">'
s/(?:h|m[^0]).*?h\K/-/;
m/h/ or s/v/l3,/g;
m/v/ or s/h([^h]*)/l$1,3/g;
- my $dot = s/\.// && qq(<circle cx="3" cy="3" r="1">);
+ my $dot = s/\.// && qq(<circle cx="3" cy="3" r="1" fill="currentColor">);
qq(<path stroke="currentColor" stroke-linecap="square" fill="none" d="$_"/>$dot)
}
qw(