common module FormatChar to show character tables
[sheet.git] / unicode.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'unicode glyph cheat sheet',
5         version => 'v1.0',
6         description => [
7                 "Common Unicode characters with digraph or code point, layed out for quick location.",
8                 "Includes general symbols, arrows, drawing characters, and IPA letters.",
9         ],
10         keywords => [qw'
11                 unicode glyph char character reference common ipa symbol sign mark table digraph
12         '],
13         stylesheet => [qw'light dark red'],
14 });
15
16 :>
17 <h1>Common Unicode</h1>
18
19 <p>i^k in <a href="/vi">Vim</a>.
20 Also see the <a href="/digraphs">complete digraphs table</a>.</p>
21
22 <div class="diinfo">
23
24 <:
25 use Shiar_Sheet::FormatChar;
26 my $glyphs = Shiar_Sheet::FormatChar->new;
27
28 sub print_glyph_tables {
29         while (@_) {
30                 printf '<div class="section"><h2>%s</h2>'."\n\n", shift;
31                 while (ref $_[0] and $_ = shift) {
32                         print $glyphs->table($_);
33                 }
34                 print '</div>';
35         }
36 }
37
38 our $verbose = exists $get{v};
39
40 print_glyph_tables(
41         'Popular',
42         [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚ . ‟ ‛}],
43         [qw{. † ‡ • . § ¶ # . © ® ™ . ° ′ ″ . − × ÷ . ± ² √}],
44         [qw{. ⚋ ⚊ . ⚐ ⚑ . ☺ ☹ . ✓ ✗ . ✔ ✘ }],
45         [qw{. å ä ö ü ß . ā æ ø ű ſ}],
46         [qw{. ñ ç é ê è . ŋ č ų ŭ ů }],
47         [qw{. ¿ … 〃 ‐ – . ‽ · ※ ‒ — }],
48         [qw{. α β}],
49
50         'Symbols',
51         [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ฿ ₫ ₭ ₦ ₱ ₮ ₩ ₪}],
52         [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}],
53         [qw{. ☮ ☯ ☻ ♪ ♲ ♿ }],
54         [qw{. ✂ ✉ ☎ }], [qw{. ⚠ ☡ ☠}],
55         'Signs',
56         [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}],  # solar
57         [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}],  # zodiac
58
59         'Key commands',
60         [qw{. ⇥ ⇤ . ␣ ⌫ }], # common spacing
61         [qw{. ⎀ ⇱ ⇞ . ⌦ ⇲ ⇟ }], # edit block
62         [qw{. ⇪ ⇯ ⇭ . ⇧ ⇮ № }], # modifier
63         [qw{. ⎈ ⌥ ⌘ ⎄ }], [qw{. ↵ ⎋ ⎉ ⎊ }], # command
64         [qw{. ► ⏩ ⏭ ◼ ⚫ . ◄ ⏪ ⏮ ⏏ -❚❚ }], # player ui
65
66         'Arrows',
67         [qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}],
68         [qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}],
69         [qw{. ⬁ ⇧ ⬀ ⬄ . ⇦ - ⇨ ⇳ . ⬃ ⇩ ⬂ -}],
70         [qw{. ⬉ ⬆ ⬈ ⬌ . ⬅ - ➡ ⬍ . ⬋ ⬇ ⬊ -}],
71         [qw{. ◩ ⬒ ⬔   . ◧ □ ◨   . ⬕ ⬓ ◪  }],
72         [qw{. ◤ ▲ ◥   . ◀ ◆ ▶   . ◣ ▼ ◢  }],
73         [qw{. ◸ △ ◹   . ◁ ◇ ▷   . ◺ ▽ ◿  }],
74 $verbose ? (
75         [qw{.    .  -  .    }],
76         [qw{.    .  -  .    }],
77 ) : (),
78
79         'Line drawing',
80         [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ - }],
81         [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛ }],
82         [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜ }],
83         [qw{. ┌ ┬ ┐ . ├ ┼ ┤ . └ ┴ ┘}],
84         [qw{. ┏ ┳ ┓ . ┣ ╋ ┫ . ┗ ┻ ┛}],
85         [qw{. ┍ ┯ ┑ . ┝ ┿ ┥ . ┕ ┷ ┙}],
86         [qw{. ┎ ┰ ┒ . ┠ ╂ ┨ . ┖ ┸ ┚}],
87         [qw{
88                 . ╴ ─ ╌ ┄ ┈ ╶ ╾
89                 . ╸ ━ ╍ ┅ ┉ ╺ ╼
90                 . ╵ │ ╎ ┆ ┊ ╷ ╿
91                 . ╹ ┃ ╏ ┇ ┋ ╻ ╽
92         }],
93         [qw{. ╭ ╮ . ╰ ╯ }],
94         [qw{. ╱ ╳ ╲ }],
95         # ┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃╄╅╆╇╈╉╊
96
97         'Blocks',
98         [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}],
99         [qw{. ░ . ▒ . ▓ }],
100         [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ }],
101         [qw{. ▛ ▚ ▟ . ▙ ▞ ▜ }],
102         [qw{. ▁ ▂ ▃ ▄ ▅ ▆ ▇ ▔ . ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▕ }],
103
104         'IPA',
105         [qw{
106                 - BiL:Bilabial LD:Labiodental D:Dental Alv:Alveolar PA:Postalveolar
107                   Rf:Retroflex Pal:Palatal Vel:Velar Uv:Uvular Ph:Pharyngeal
108                   EG:Epiglottal Gl:Glottal
109                 .>Plosive                   p  -ȹ >  >  t  ʈ  c  k  q  =  ʡ  ʔ
110                 .>Voiced_Plosive            b  -ȸ >  >  d  ɖ  ɟ  ɡ  ɢ  =  -  =
111                 .>Nasal                     m  ɱ  >  >  n  ɳ  ɲ  ŋ  ɴ  =  =  =
112                 .>Trill                     ʙ  -  >  >  r  -  -  =  ʀ  =  -я =
113                 .>Tap/flap                  -  ⱱ  >  >  ɾ  ɽ  -  =  ɢ̆  =  -  =
114                 .>Fricative                 ɸ  f  θ  s  ʃ  ʂ  ç  x  χ  ħ  ʜ  h
115                 .>Voiced_fricative          β  v  ð  z  ʒ  ʐ  ʝ  ɣ  ʁ  ʕ  ʢ  ɦ
116                 .>Lateral_fricative         =  =  >  >  ɬ  -  -  -  -  =  =  =
117                 .>Voiced_lateral_fricative  =  =  >  >  ɮ  -  -  -  -  =  =  =
118                 .>Approximant               -  ʋ  >  >  ɹ  ɻ  j  ɰ  -  -  -  =
119                 .>Lateral_approximant       =  =  >  >  l  ɭ  ʎ  ʟ  -  =  =  =
120                 .>Click                     ʘ  -  ǀ  ǁ  ǃ  -‼ ǂ  -  -  =  =  =
121                 .>Implosive                 ɓ  ɗ̪  >  >  ɗ  -ᶑ ʄ  ɠ  ʛ  =  =  =
122         }],
123         [qw{
124                 - co:coarticulated .>sç ɕ .>zʝ ʑ .>ʃx ɧ .>jʷ ɥ .>hw̥ ʍ .>ɰʷ w
125         }],
126         [(
127                 '-',
128                 map { substr($_, 0, 1).':'.$_, substr($_, 0, 1)." r:$_ rounded" }
129                 qw{Front Central Back}
130         ), qw{
131                 .>Close      i y  ɨ ʉ  ɯ u
132                 .>Near-close ɪ ʏ  - -  - ʊ
133                 .>Close-mid  e ø  ɘ ɵ  ɤ o
134                 .>Mid        - -  ə -  - -
135                 .>Open-mid   ɛ œ  ɜ ɞ  ʌ ɔ
136                 .>Near-open  æ -  ɐ -  - -
137                 .>Open       a ɶ  - -  ɑ ɒ
138         }],
139
140 $verbose ? (
141         'Japanese',
142         [qw{
143                   - A  I  U  E  O  _
144                 .>  あ い う え お =
145                 .>K か き く け こ =
146                 .>S さ し す せ そ =
147                 .>T た ち つ て と =
148                 .>N な に ぬ ね の ん
149                 .>H は ひ ふ へ ほ =
150                 .>M ま み む め も =
151                 .>Y や =  ゆ =  よ =
152                 .>R ら り る れ ろ =
153                 .>W わ -ゐ = -ゑ を =
154         }],
155         [qw{
156                   - A  I  U  E  O
157                 .>G が ぎ ぐ げ ご
158                 .>Z ざ じ ず ぜ ぞ
159                 .>D だ ぢ づ で ど
160                 .>B ば び ぶ べ ぼ
161                 .>P ぱ ぴ ぷ ぺ ぽ
162         }],
163         [qw{
164                   - A  I  U  E  O  _
165                 .>  ア イ ウ エ オ ー
166                 .>K カ キ ク ケ コ =
167                 .>S サ シ ス セ ソ =
168                 .>T タ チ ツ テ ト =
169                 .>N ナ ニ ヌ ネ ノ ン
170                 .>H ハ ヒ フ ヘ ホ =
171                 .>M マ ミ ム メ モ =
172                 .>Y ヤ -  ユ -  ヨ =
173                 .>R ラ リ ル レ ロ =
174                 .>W ワ ヰ -  ヱ ヲ =
175         }],
176         [qw{
177                   - A  I  U  E  O
178                 .>G ガ ギ グ ゲ ゴ
179                 .>Z ザ ジ ズ ゼ ゾ
180                 .>D ダ ヂ ヅ デ ド
181                 .>B バ ビ ブ ベ ボ
182                 .>P パ ピ プ ペ ポ
183                 .>V ヷ ヸ ヴ ヹ ヺ
184         }],
185 ) : (),
186 );
187
188 :></div>
189
190 <div class="legend">
191         <table class="glyphs"><tr>
192         <td class="X di-a">ascii
193         <td class="X di-d">digraph
194         <td class="X di-prop">proposed
195         <td class="X di-b">other unicode
196         <td class="X di-rare">discouraged
197         </table>
198 </div>
199