+$charlist{fonts} = \@fontlist;
+
+my %osfonts = (
+ win2k => [qw( arial.win2k arialuni lucidau verdana.win2k times.win2k cour.win2k )], # microsoft
+ win8 => [map {"$_.win8"} qw( arial verdana times georgia pala cour )],
+ mac109 => [map {"$_.mac109"} qw( helv lucida times pala )], # apple
+ android => [qw( roboto droidmono notosans )], # google
+ oss => [qw( dvsans freesans code2000 unifont )],
+);
+if (0) {
+ # copy rows to derive older os versions (same list with different trailing number)
+ s/8$/7/ for @{ $osfonts{ win7} = [@{ $osfonts{ win8} }] };
+ s/9$/7/ for @{ $osfonts{mac107} = [@{ $osfonts{mac109} }] };
+}
+
+my %fontnum = map { ($fontlist[$_]->{file} => $_) } 0 .. $#fontlist;
+while (my ($os, $fontids) = each %osfonts) {
+ $charlist{os}->{$os} = [ map { $fontnum{$_} // () } @{$fontids} ];
+}
+$charlist{osdefault} = [qw( win2k win8 mac109 android oss )];
+