X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/bba917e54169127218b3580c98686ba6aaf88fb4..14f601eca298322aba783e465d345e13f31705ed:/unicode.plp diff --git a/unicode.plp b/unicode.plp index 5e0327e..bcfebd1 100644 --- a/unicode.plp +++ b/unicode.plp @@ -5,7 +5,7 @@ use warnings; no warnings 'qw'; # that's not a comment, it's a NUMBER SIGN use open IO => ':utf8'; -our $VERSION = '1.0'; +our $VERSION = 'v1.0'; $header{content_type} = 'text/html; charset=utf-8'; @@ -16,10 +16,16 @@ $header{content_type} = 'text/html; charset=utf-8'; digraph cheat sheet - +<: + my %styles = map {$_ => $_} qw(dark circus mono red terse); + our $style = exists $get{style} && $styles{$get{style}} || 'light'; + printf(qq{\n}, + $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_ + ) for keys %styles; +:> - +

Common uncommon Unicode

i^k in Vim. @@ -75,8 +81,7 @@ sub glyph_table { next; } - my $code = join '', map { $di{ord $_} || '' } split //, $cell; - my $name = $diinfo->{$code}->[1]; + my ($code, $name); # determine display class my @class; @@ -92,11 +97,18 @@ sub glyph_table { push @class, 'di-rare'; # discouraged } - if ($code) { + $code = join '', map { $di{ord $_} || '' } split //, $cell; + $name = $diinfo->{$code}->[1]; + length $code == 2 or undef $code; + + if (defined $code) { push @class, 'di-d'; # digraph push @class, 'di-prop' # unofficial if $diinfo->{$code}->[2] =~ /\bXz\b/; } + elsif (defined $name) { + push @class, 'X'; + } if ($cell =~ /[ -~]/) { push @class, 'di-a'; # ascii @@ -112,7 +124,7 @@ sub glyph_table { @class ? sprintf(' class="%s"', join ' ', @class) : '', $colspan > 1 && qq{ colspan="$colspan"}, $cell eq '' ? ' ' : quote($cell), - $code ne '' ? sprintf(' %s', quote($code)) + defined $code ? sprintf(' %s', quote($code)) : length($cell) == 1 && $cell !~ /[a-z]/ ? sprintf(' %04X', 'value', ord $cell) : '', @@ -137,16 +149,16 @@ sub print_glyph_tables { print_glyph_tables( 'Popular', - [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚}], - [qw{. † ‡ • . § ¶ # . © ® ™ . − × ÷ . ± ² √}], + [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚ . ‟ ‛}], + [qw{. † ‡ • . § ¶ # . © ® ™ . ° ′ ″ . − × ÷ . ± ² √}], [qw{. Ã¥ ä ö ü ß . Å æ ø ű Å¿}], [qw{. ¿ ç ñ é ê è}], 'Arrows', [qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}], [qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}], - [qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢}], - [qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿}], + [qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢ }], + [qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿ }], 'Line drawing', [qw{. ┌ ┬ ┐ . ├ ┼ ┤ . └ ┴ ┘}], @@ -182,8 +194,8 @@ print_glyph_tables( - BiL:Bilabial LD:Labiodental D:Dental Alv:Alveolar PA:Postalveolar Rf:Retroflex Pal:Palatal Vel:Velar Uv:Uvular Ph:Pharyngeal EG:Epiglottal Gl:Glottal - .>Plosive p p̪ > > t ʈ c k q = Ê¡ ʔ - .>Voiced_Plosive b b̪ > > d ɖ ɟ É¡ É¢ = - = + .>Plosive p -ȹ > > t ʈ c k q = Ê¡ ʔ + .>Voiced_Plosive b -ȸ > > d ɖ ɟ É¡ É¢ = - = .>Nasal m ɱ > > n ɳ ɲ ŋ É´ = = = .>Trill ʙ - > > r - - = ʀ = -я = .>Tap/flap - â±± > > ɾ ɽ - = ɢ̆ = - = @@ -196,13 +208,16 @@ print_glyph_tables( .>Click ʘ - ǀ ǁ ǃ -‼ ǂ - - = = = .>Implosive ɓ ɗ̪ > > ɗ -ᶑ ʄ É  ʛ = = = }], + [qw{ + co . ɕ . ʑ . ɧ . É¥ . ʍ . w + }], [( '-', map { substr($_, 0, 1).':'.$_, substr($_, 0, 1)." r:$_ rounded" } qw{Front Central Back} ), qw{ .>Close i y ɨ ʉ ɯ u - .>Near-close - ɪ ʏ - ʊ - + .>Near-close ɪ ʏ - - - ʊ .>Close-mid e ø ɘ ɵ ɤ o .>Mid - - ə - - - .>Open-mid ɛ œ ɜ ɞ ʌ ɔ @@ -230,7 +245,7 @@ print_glyph_tables( .>M ま み む め も = .>Y や = ゆ = よ = .>R ら り る れ ろ = - .>W わ ゐ = ゑ を = + .>W わ -ゐ = -ゑ を = }], [qw{ - A I U E O @@ -266,16 +281,22 @@ print_glyph_tables( :> -

+ +
ascii + digraph + proposed + other unicode + discouraged +
+
+ +