font: mkfontinfo: strip whitespace from support arrays
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 7 Mar 2015 22:59:22 +0000 (23:59 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 9 Jun 2015 03:43:43 +0000 (05:43 +0200)
Reduces file size from 1_064_830 to 197_514 bytes.

tools/mkfontinfo

index 12c53a52ed1d3d94b3077fdb4e6de1c965932c60..dc8ddd602425290b9af0ad84ae9d0dc6e0c840ef 100755 (executable)
@@ -124,7 +124,9 @@ $charlist{osdefault} = [qw( win95 win8 mac10 oss android )];
 
 say "# automatically generated by $0";
 say 'use utf8;';
-say '+'.pp(\%charlist);
+say '+', pp(\%charlist) =~ s{
+       ( \[ \s* \d [^]]* ) ,\s*  # arrays of numbers, excluding trailing comma
+}{ $1 =~ s/\s+//gr }msxgre;  # strip whitespace
 
 __END__