/
BuildAndInstall
executable file
·31 lines (25 loc) · 1.21 KB
/
BuildAndInstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
rm -rf work
mkdir work
echo "== Converting the font using FontForge =="
fontforge -lang=ff -c 'Open("Jena1330.sfdir"); Generate("work/Jena1330.pfb", "", 0x410201)'
# See font forge scripting language description on
# http://fontforge.sourceforge.net/scripting-alpha.html
# Build pfb, in addition:
# Generate an afm file
# Generate a 'TeX' table containing font metrics information
# Generate a tfm file
# Add composite (mark to base) information to the afm file
echo "== Creating a new ligtable for the TeX font metric =="
./mkligtable.py Jena1330.sfdir/ >> work/Jena1330_ligtable.pl
echo "== Stepping into the working directory =="
cp jena.tex jena1330.sty VrowenlopAlexander TopRight.jpg BottomLeft.jpg work/
cd work
echo "== Modifying the tfm by inserting the previously generated ligtable =="
tftopl -charcode-format=octal Jena1330.tfm Jena1330_fromtfm.pl
echo "=>"
perl -lne 'if ( not /^\(LIGTABLE/ .. /^\s*\)$/ ) { print } else { if ( not $already_done ) { open LIG, "Jena1330_ligtable.pl"; @lines = <LIG>; close(LIG); print @lines; $already_done = 1 ; } } ' Jena1330_fromtfm.pl > Jena1330_new.pl
echo "=>"
pltotf Jena1330_new.pl Jena1330.tfm
echo "== Compiling LaTeX test document =="
pdflatex jena.tex