From: Mischa POSLAWSKY Date: Thu, 19 Feb 2015 23:09:37 +0000 (+0100) Subject: font: virtual group for html entities X-Git-Tag: v1.7~126 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/9ae15ec3a7007abdd580cd30e4d9e9fbb47628da?hp=729cd54c52950380bbedabe9d76e5ce41692fdcc font: virtual group for html entities --- diff --git a/font.plp b/font.plp index 33909e6..5da4e53 100644 --- 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} || ()) { diff --git a/tools/mkfontinfo b/tools/mkfontinfo index a9f0d37..1bf181f 100755 --- a/tools/mkfontinfo +++ b/tools/mkfontinfo @@ -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;