termcol: adapt text colour to background luminosity
[sheet.git] / unicode.plp
index e28bb062d610ee747dea6d2296875c9ec1670baf..b55e7715fa2e838d065b60fc01f4eacac77e6e4e 100644 (file)
@@ -14,8 +14,8 @@ $header{content_type} = 'text/html; charset=utf-8';
 <html>
 
 <head>
-<title>digraph cheat sheet</title>
 <meta http-equiv="content-type" content="utf-8">
+<title>digraph cheat sheet</title>
 <link rel="stylesheet" type="text/css" media="all" href="/base.css"><:
        my %styles = map {$_ => $_} qw(dark circus mono red terse);
        our $style = exists $get{style} && $styles{$get{style}} || 'light';
@@ -36,7 +36,7 @@ Also see the <a href="/digraphs">complete digraphs table</a>.</p>
 <:
 my $diinfo = do 'digraphs.inc.pl';
 my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
-       keys %$diinfo;
+       sort { length $a <=> length $b } keys %$diinfo;
 
 sub quote {
        local $_ = shift;
@@ -147,6 +147,8 @@ sub print_glyph_tables {
        }
 }
 
+our $verbose = exists $get{v};
+
 print_glyph_tables(
        'Popular',
        [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚ . ‟ ‛}],
@@ -154,6 +156,7 @@ print_glyph_tables(
        [qw{. ⚋ ⚊ . ⚐ ⚑ . ☺ ☹ . ✓ ✗ . ✔ ✘ . ◄ ► }],
        [qw{. å ä ö ü ß . Å æ ø ű ſ}],
        [qw{. ¿ ç ñ é ê è}],
+       [qw{. α β}], [qw{. א}],
 
        'Signs',
        [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}],
@@ -169,8 +172,10 @@ print_glyph_tables(
        [qw{. ◩ ⬒ ⬔   . ◧ □ ◨   . ⬕ ⬓ ◪  }],
        [qw{. ◤ ▲ ◥   . ◀ ◆ ▶   . ◣ ▼ ◢  }],
        [qw{. ◸ △ ◹   . ◁ ◇ ▷   . ◺ ▽ ◿  }],
+$verbose ? (
        [qw{.    .  -  .    }],
        [qw{.    .  -  .    }],
+) : (),
 
        'Line drawing',
        [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ - }],
@@ -231,14 +236,7 @@ print_glyph_tables(
                .>Open       a ɶ  - -  ɑ ɒ
        }],
 
-       'Alphabetics',
-       [qw{
-               .>Latin    a ī ı ę ô ɳ ŋ ṡ š đ ð Ʒ
-               .>Cyrillic а і й э ё н њ ш щ ч ь Я
-               .>Greek    α ί ϊ η ϋ π ψ σ ς θ ξ Ω
-               .>Hebrew   א ײ י ע ו נ ן ס ש ט צ ץ
-       }],
-
+$verbose ? (
        'Japanese',
        [qw{
                  - A  I  U  E  O  _
@@ -283,6 +281,7 @@ print_glyph_tables(
                .>P パ ピ プ ペ ポ
                .>V ヷ ヸ ヴ ヹ ヺ
        }],
+) : (),
 );
 
 :></div>