4 title => 'character support sheet',
7 unicode glyph char character reference common ipa symbol sign mark table digraph
9 stylesheet => [qw'light dark mono circus red'],
10 data => [qw'unicode-table.inc.pl unicode-char.inc.pl'],
14 <h1>Character support</h1>
17 Selected characters from Unicode <a href="/unicode">preset</a>
18 or <a href="/charset">range</a>.
25 use Shiar_Sheet::FormatChar;
26 my $glyphs = Shiar_Sheet::FormatChar->new;
29 win95 => [qw/arial ariuni verdana times/],
31 oss => ['dv ss', qw/droid c2k guf/],
35 my @ossel = qw(win95 oss);
37 my $tables = do 'unicode-table.inc.pl' or die $@ || $!;
38 my (%font, @fontlist);
40 my $osfonts = $oslist{$os};
41 for my $fontid (@{$osfonts}) {
42 push @fontlist, $fontid;
43 my ($fontmeta, @fontrange) = do "ttfsupport/$fontid.inc.pl";
46 -id => $fontmeta->{id} || $fontid,
47 -name => $fontmeta->{name},
48 map { (chr $_ => 1) } @fontrange
54 punctuation/common punctuation/marks
58 $_ and m{/*+(.+)} and @config = split /[ ]/, $1 for $ENV{PATH_INFO}, $get{q};
59 @config = qw(ipa/cons ipa/vowels) if 0;
62 my ($tablegroup, $tablename) = split m{/}, $_, 2;
64 print '<table class=mapped>';
65 printf '<caption>%s</caption>', "$tablegroup: $tablename";
68 print "<colgroup span=$_>" for 2, map { scalar @{$oslist{$_}} } @ossel;
70 print '<td colspan=2>char';
72 print '<td>di<td>html';
73 printf('<td colspan=%d title="%s">%s',
76 join(', ', map { $_->{-name} } @font{ @{$_} }),
81 my $table = $tables->{$tablegroup}->{$tablename};
83 for my $chr (@$table) {
84 $chr =~ m/^\./ .. 1 or next;
87 print "<tbody style=\"border-bottom:3px double #AAA\">\n";
96 my $codepoint = ord $chr;
97 my $ascii = $codepoint <= 127;
99 print "<tr><th>$chr\n";
100 my $info = $glyphs->glyph_info($codepoint);
101 my ($class, $name, $mnem, $html, $string) = @$info;
102 print "<td>$_" for sprintf('%X', $codepoint), EscapeHTML($name);
103 printf '<td class="%s">%s', @$_ for (
104 [$ascii ? 'l0' : defined $mnem ? 'l4' : 'l1', $mnem // ''],
105 [$ascii ? 'l0' : defined $html ? 'l4' : 'l1', $html // ''],
107 !$font{$_}->{-id} ? [l0 => "$_?"] :
108 $font{$_}->{$chr} ? [l4 => $font{$_}->{-id}] : [l1 => '']
116 <script type="text/javascript" src="/clipboard.js"></script>