font: determine source os to better explain distribution
[sheet.git] / tools / mkttfinfo
index 988fcdccdf51adfd8aa33e3daf77eed864985299..a452389280037aa882dc0e66aa0b6094278cdb21 100755 (executable)
@@ -61,6 +61,17 @@ for ($outfile || ()) {
        $meta{abbr} = lc join '', $meta{name} =~ s/ MS$//r =~ m{
                (?!Sans) (?<! [0-9]) ([[:upper:]0-9])
        }gx;
        $meta{abbr} = lc join '', $meta{name} =~ s/ MS$//r =~ m{
                (?!Sans) (?<! [0-9]) ([[:upper:]0-9])
        }gx;
+       $meta{os} = $_ for "@ttfext[0 .. $#ttfext-1]" || (
+               $meta{copyright} =~ /\bGoogle\b/ ? "Android" :
+               $ttfname eq 'arialuni' ? 'win95' :
+               ()
+       );
+       $meta{oscorp} = (
+               s/^mac10/OS X 10./ ? 'Apple' :
+               s/^win/Windows / ? 'Microsoft' :
+               m/^Android/ ? 'Google' :
+               undef
+       ) for $meta{os} || ();
 
        say "# automatically generated by $0";
        say '+', pp(\%meta), ',';
 
        say "# automatically generated by $0";
        say '+', pp(\%meta), ',';