* tag version 2.22
[dejavu.git] / trunk / dejavu-fonts / scripts / samples.sh
blob051d255a93bbd732e8dfffb1c5ed02c6e2932ffd
1 #! /bin/sh
3 # Author Євгеній Мещеряков <eugen@debian.org>
4 # This file is in public domain
6 set -e
8 if [ $# != 2 ]
9 then
10 echo "Usage: $0 <new directory> <old directory>"
11 exit 1
14 new_dir="$1"
15 old_dir="$2"
16 tmp_dir=`mktemp -dt gensamples.XXXXXXXXXX`
18 for file in $new_dir/*.ttf
20 base_name=`basename $file .ttf`
21 fntsample -f $file -o $tmp_dir/$base_name.pdf -d $old_dir/$base_name.ttf -l > $tmp_dir/$base_name.txt
22 pdfoutline $tmp_dir/$base_name.pdf $tmp_dir/$base_name.txt $base_name.pdf
23 done
25 rm -rf $tmp_dir