blob: 8c2dc4dff61db23744cc22be9241b794f50adf97 (
plain)
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
|
#!/bin/sh
# This file is part of the Gentium package for TeX.
# It is licensed under the Expat License, see doc//README for details.
# Generates extra kerning pairs for Greek.
# GentiumBasic has no Greek, so no correction is needed.
#
# If you want to keep the files with extra kerning pairs,
# run just this script.
TTF_PATH="../../../../fonts/truetype/public/gentium-tug"
AFM_PATH="../../../../fonts/afm/public/gentium-tug"
for i in GentiumPlus-R.ttf GentiumPlus-I.ttf; do
echo "----------------------------------------------"
echo "* Generating extra kerns for $i"
echo "* Converting font to sfd"
FILE_TTF="$TTF_PATH/$i"
FILE_SFD="$(basename $i .ttf).sfd"
fontforge -lang=ff -c "Open('$FILE_TTF');Save('$FILE_SFD')"
echo "* Calculating the kerns"
./greekcorrection.py $(basename $i .ttf).sfd
./kerncorrection.py "$AFM_PATH/$(basename $i .ttf).afm" $(basename $i .ttf)-extra.afm
cat $(basename $i .ttf)-Czech.kern >> $(basename $i .ttf)-extra.afm
done
rm *sfd
|