formatchar: annotation options, print method
[sheet.git] / unicode.plp
index 4a3a0869c9633a5642df099d323b46bfa2060c6b..f506fb59165df582096e3fbced9d105457adf9a6 100644 (file)
@@ -16,8 +16,11 @@ Html({
 :>
 <h1>Common Unicode</h1>
 
-<p>i^k in <a href="/vi">Vim</a>.
-Also see the <a href="/digraphs">complete digraphs table</a>.</p>
+<p>
+Glyphs are followed by
+<a href="/digraphs">digraph</a> or <a href="/charset">code point</a>,
+i^k or i^vu respectively in <a href="/vi">Vim</a>.
+</p>
 
 <div class="diinfo">
 
@@ -25,38 +28,47 @@ Also see the <a href="/digraphs">complete digraphs table</a>.</p>
 use Shiar_Sheet::FormatChar;
 my $glyphs = Shiar_Sheet::FormatChar->new;
 
-sub print_glyph_tables {
-       while (@_) {
-               printf '<div class="section"><h2>%s</h2>'."\n\n", shift;
-               while (ref $_[0] and $_ = shift) {
-                       print $glyphs->table($_);
-               }
-               print '</div>';
-       }
+if (exists $get{q}) {
+       $glyphs->{unicode}--;
+       $glyphs->{digraph}--;
 }
 
 our $verbose = exists $get{v};
 
-print_glyph_tables(
+$glyphs->print(
        'Popular',
        [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚ . ‟ ‛}],
        [qw{. † ‡ • . § ¶ # . © ® ™ . ° ′ ″ . − × ÷ . ± ² √}],
-       [qw{. ⚋ ⚊ . ⚐ ⚑ . ☺ ☹ . ✓ ✗ . ✔ ✘ }],
+       [qw{. ⚋ ⚊ . ⚐ ⚑ . ☺ ☹ . ✓ ✗ . ✔ ✘ }, $verbose ? () : qw{. ◄ ►}],
        [qw{. å ä ö ü ß . ā æ ø ű ſ}],
-       [qw{. ñ ç é ê è . ŋ č ų ŭ ů }],
-       [qw{. ¿ … 〃 ‐ – . ‽ · ※ ‒ — }],
+       [qw{
+               . á è õ û ç . ą ı ơ ů þ
+       }],
+       $verbose ? [qw{
+               .>Englisc   æ ð ē ȝ œ þ ƿ
+               .>Sámi      á č đ ŋ š ŧ ž
+               .>Slavic    ą ě ł ů ź ż ž
+               .>Türkçe    ç ğ ı İ ö ş ü
+               .>Esperanto ĉ ĝ ĥ ĵ ŝ ŭ
+       }] : (),
        [qw{. α β}],
+       [qw{. ¿ … 〃 ‐ – . ‽ · ※ ‒ — }],
 
        'Symbols',
        [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ฿ ₫ ₭ ₦ ₱ ₮ ₩ ₪}],
        [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}],
        [qw{. ☮ ☯ ☻ ♪ ♲ ♿ }],
-       [qw{. ✂ ✉ ☎ }], [qw{. ⚠ ☡ ☠}],
+       [qw{. ✂ ✉ ℻ ☎ ☏}, $verbose ? qw{. 🔞 🔾 🔰 🔮 🕀 } : ()], # communication
+       [qw{. ✊ ✋ ✌ }, $verbose ? qw{. 🖹 🐜 👼 } : ()], # 3-way (RockPaperScissors, TerranProtossZerg)
+       [qw{. ⚠ ☡ ☠}],
        'Signs',
        [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}],  # solar
        [qw{
                . ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓
+       }, !$verbose ? () : qw{
                . 寅 卯 辰 巳 午 未 申 酉 戌 亥 子 丑
+               . 虎 兔 龍 蛇 馬 羊 猴 雞 狗 豬 鼠 牛
+               . 🐅 🐇 🐉 🐍 🐎 🐐 🐒 🐓 🐕 🐖 🐀 🐂
        }], # zodiac
 
        'Key commands',
@@ -64,7 +76,9 @@ print_glyph_tables(
        [qw{. ⎀ ⇱ ⇞ . ⌦ ⇲ ⇟ }], # edit block
        [qw{. ⇪ ⇯ ⇭ . ⇧ ⇮ № }], # modifier
        [qw{. ⎈ ⌥ ⌘ ⎄ }], [qw{. ↵ ⎋ ⎉ ⎊ }], # command
+$verbose ? (
        [qw{. ► ⏩ ⏭ ◼ ⚫ . ◄ ⏪ ⏮ ⏏ -❚❚ }], # player ui
+) : (),
 
        'Arrows',
        [qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}],