4 title => 'latin alphabet cheat sheet',
9 latin roman alphabet script letter unicode font glyph abc
10 code encoding spelling symbol writing comparison character
11 secret cursive fraktur blind braille morse deaf asl hand
12 barcode bar color semaphore flag
14 stylesheet => [qw'light dark red'],
15 data => ['writing-latn.inc.pl'],
21 font-family: Suetterlin; /* R. G. Arens */
22 src: url("/suetterlin.ttf");
24 #sütterlin td { font-family: Suetterlin }
29 word-spacing: 5em; /* force line break between words */
32 stroke-linecap: square;
36 stroke-linecap: round;
37 stroke-linejoin: round;
43 #pigpen .sample > svg {
46 #nyctographs .sample > svg {
47 background: rgba(0,0,0, .1);
52 svg path:not([fill]) {
61 vertical-align: middle;
65 <h1>Latin alphabet</h1>
67 <p>Variant encodings of the common ASCII (latin, roman,
68 or <span title="fuck yeah!">'mercan</span>) letters A–Z.
69 Also see <a href="/writing">related alphabets</a>
70 and <a href="/unicode">common chars</a>.</p>
75 use List::Util qw( pairs );
77 my @table = do 'writing-latn.inc.pl';
79 Alert("Table data not found", $@ || $!);
82 say '<table class="glyphs">';
83 for my $row (pairs @table) {
84 my ($title, $cells) = @{$row};
85 printf '<tr id="%s">', (lc $title) =~ s/<[^>]+>//gr =~ s/\s+/-/gr;
95 print " colspan=$colspan";
98 print ' class=', $_ ? 'ex' : 'u-invalid' if s/^-//;
109 var inputel = document.createElement('INPUT');
110 inputel.oninput = function () {
111 var rows = document.getElementsByClassName('glyphs')[0].rows;
112 for (var row of rows) {
113 cols = [ row.cells[0] ];
114 for (var col = 1; col <= 26; col++) {
115 cols[col] = cols[ col - 1 ].nextSibling;
116 for (var span = 1; span < cols[col].colSpan; span++) {
117 var same = cols[col];
121 var samplecol = row.getElementsByClassName('sample');
122 if (samplecol.length) {
123 samplecol = samplecol[0];
126 samplecol = row.appendChild(document.createElement('TD'));
127 samplecol.className = 'sample';
131 var input = inputel.value.toUpperCase();
132 for (var i = 0; i < input.length; i++) {
133 var col = input.charCodeAt(i) - 64;
134 if (col < 1 || col > 26) {
135 output += ' ';
138 output += cols[col].innerHTML.trimRight();
141 samplecol.innerHTML = output;
145 var container = document.createElement('P');
146 container.appendChild(inputel);
147 document.body.appendChild(container);