font: virtual group for html entities
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 19 Feb 2015 23:09:37 +0000 (00:09 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 9 Jun 2015 03:43:41 +0000 (05:43 +0200)
font.plp
tools/mkfontinfo

index 33909e67ab89d6a8b879964d67f3251fd470f048..5da4e533c9dfe084f4175c37a77aba9e20bab4a6 100644 (file)
--- a/font.plp
+++ b/font.plp
@@ -61,6 +61,7 @@ my @rows = (
        'table/lines/single',
        'table/block',
        'table/lines',
+       'table/html',
 );
 
 for my $group ($ENV{PATH_INFO} || ()) {
index a9f0d37c9566c97061d1b4423a27bcb834f09e19..1bf181f7d4daf4edfb832ffe5bb438389583662a 100755 (executable)
@@ -46,6 +46,17 @@ if ($chartables) {
        }
 }
 
+eval {
+       require HTML::Entities;
+       our %char2entity;
+       HTML::Entities->import('%char2entity');
+       while (my ($char, $entity) = each %char2entity) {
+               $entity =~ /[a-zA-Z]/ or next;  # only actual aliases
+               push @{ $charlist{table}->{html} }, $char;
+       }
+       1;
+} or warn "Could not include count for html entities: $@";
+
 use Unicode::UCD 'charinfo';
 for my $code (0 .. 256**2) {
        my $charinfo = charinfo($code) or next;