X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/3f105ae3161afb8bfc16cb0b6fee0faa2e43cc55..2256b9ba39da3c2f3577bd227363509c6676e23b:/tools/convert-allfonts diff --git a/tools/convert-allfonts b/tools/convert-allfonts index f3ccffc..9d75e06 100755 --- a/tools/convert-allfonts +++ b/tools/convert-allfonts @@ -8,9 +8,9 @@ use File::Basename 'dirname'; chdir dirname $0; -my $convbin = './convert-ttf.pl'; +my $convbin = './mkttfinfo'; my $outdir = '../ttfsupport'; -my @ttfpath = '~/.fonts'; # local fallbacks +my @ttfpath = ('~/.fonts', '../data/osx-fonts'); # local fallbacks if (my $mspath = '/usr/share/fonts/truetype/msttcorefonts') { if (my $src = first { -e } map { glob "$_/Verdana.ttf" } $mspath, @ttfpath) { @@ -33,6 +33,15 @@ if (my $mspath = '/usr/share/fonts/truetype/msttcorefonts') { } } +if (my $ampath = '/usr/share/fonts/truetype/macfonts') { + if (my $src = first { -e } map { glob "$_/Lucida?Grande.ttf" } $ampath, @ttfpath) { + system $convbin, $src, "$outdir/lucida.inc.pl"; + } + if (my $src = first { -e } map { glob "$_/AppleGaramond.ttf" } $ampath, @ttfpath) { + system $convbin, $src, "$outdir/garamond.inc.pl"; + } +} + if (my $dvpath = '/usr/share/fonts/truetype/ttf-dejavu') { if (my $src = first { -e } map { glob "$_/DejaVuSans.ttf" } $dvpath, @ttfpath) { system $convbin, $src, "$outdir/dvsans.inc.pl"; @@ -47,7 +56,7 @@ if (my $dvpath = '/usr/share/fonts/truetype/ttf-dejavu') { if (my $gdpath = '/usr/share/fonts/truetype/droid') { if (my $src = first { -e } map { glob "$_/DroidSans.ttf" } $gdpath, @ttfpath) { - system $convbin, $src, "$outdir/droidsans.inc.pl"; + system $convbin, $src, "$outdir/droid.inc.pl"; } if (my $src = first { -e } map { glob "$_/DroidSerif.ttf" } $gdpath, @ttfpath) { system $convbin, $src, "$outdir/droidserif.inc.pl"; @@ -57,6 +66,21 @@ if (my $gdpath = '/usr/share/fonts/truetype/droid') { } } +if (my $grpath = '/usr/share/fonts/truetype/roboto') { + if (my $src = first { -e } map { glob "$_/Roboto-Regular.ttf" } $grpath, @ttfpath) { + system $convbin, $src, "$outdir/roboto.inc.pl"; + } +} + +if (my $gnpath = '/usr/share/fonts/truetype/noto') { + if (my $src = first { -e } map { glob "$_/NotoSans-Regular.ttf" } $gnpath, @ttfpath) { + system $convbin, $src, "$outdir/noto.inc.pl"; + } + if (my $src = first { -e } map { glob "$_/NotoSerif-Regular.ttf" } $gnpath, @ttfpath) { + system $convbin, $src, "$outdir/noto.inc.pl"; + } +} + { if (my $src = first { -e } map { glob "$_/code2000.ttf" } @ttfpath) { system $convbin, $src, "$outdir/c2k.inc.pl";