-
Notifications
You must be signed in to change notification settings - Fork 1
/
rebuild.sh
executable file
·42 lines (34 loc) · 1.21 KB
/
rebuild.sh
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
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Simple Script to rebuild the fonts in this package.
# Parameters
fontname="SourceSansPro"
vend="adobe"
# Remove capitals from font
font=${fontname,,}
# Backup the hand-written package
mv tex/latex/$font/$font.sty tex/latex/$font/$font.sty.tmp
# Create symlink to encoding
ln -s "$(kpsewhich CB.enc)" lgr.enc
# Convert the OpenType fonts
autoinst fonts/opentype/$vend/$font/* \
-sanserif \
-target=. \
-vendor="$vend" \
-typeface="$font" \
-encoding=OT1,T1,LY1,TS1,LGR \
-ts1 \
-smallcaps \
-superiors \
-inferiors \
-fractions \
-noswash \
-notitling \
-noornaments \
-noupdmap
# Move the generated file and the hand-written one back
mv tex/latex/$font/$fontname.sty tex/latex/$font/$font-type1-autoinst.sty
mv tex/latex/$font/$font.sty.tmp tex/latex/$font/$font.sty
# Remove encoding
rm lgr.enc
# Remove empty directories
find . -type d -empty -delete