#! /bin/csh -f

#  Runs fontforge to create all the MathJax font files
#  (in all the formats required)
#  
#  Usage: ./makeOTF

echo "MathJax_Size4.ff"
fontforge -lang=ff -script ff/MathJax_Size4.ff

foreach file (ff/*.ff)
echo ""
echo $file:t
fontforge -lang=ff -script $file
end

rm otf/*Greek*

echo ""
echo "ttf2eot"
foreach file (ttf/*.ttf)
echo $file:t:r
ttf2eot < $file > eot/$file:t:r.eot
end

echo ""
echo "Convert to svg"
foreach file (ttf/*.ttf)
echo $file:t:r
java -jar lib/batik-1.7/batik-ttf2svg.jar $file -id $file:t:r -o svg/$file:t:r.svg -l 0 -h 65535
end

rm ttf/*WinChrom* ttf/*WinIE6*
rm eot/*WinChrome* eot/*Greek*
rm svg/*WinIE6* svg/*Greek*

