formatchar: separate anno and style options
[sheet.git] / unicode.plp
index d7e5e01544596da7675b0c9cdbdb766736be03fe..5b3093d05c781db29e05d3c0219cb4ea90a1fac3 100644 (file)
@@ -31,12 +31,12 @@ use Shiar_Sheet::FormatChar;
 my $glyphs = Shiar_Sheet::FormatChar->new;
 
 if (exists $get{di}) {
-       $glyphs->{digraph} = defined $get{di} ? ! !$get{di} : 1;
+       $glyphs->{anno} = (!defined $get{di} || $get{di}) && 'di';
        $glyphs->{unicode} = 1;
 }
 if (exists $get{q}) {
        $glyphs->{unicode} = -1;
-       $glyphs->{digraph}--;
+       $glyphs->{anno} = 0;
 }
 
 our $verbose = exists $get{v};
@@ -136,8 +136,8 @@ $glyphs->print(map {
 <div class="legend">
        <table class="glyphs"><tr>
        <td class="X l4">ascii
-       <td class="X l3"><:= $glyphs->{digraph} ? 'digraph' : 'latin1' :>
-       <td class="X l2"><:= $glyphs->{digraph} ? 'proposed' : 'BMP' :>
+       <td class="X l3"><:= $glyphs->{style} eq 'di' ? 'digraph' : 'latin1' :>
+       <td class="X l2"><:= $glyphs->{style} eq 'di' ? 'proposed' : 'BMP' :>
        <td class="X l1">other unicode
        <td class="X ex">discouraged
        </table>