-
-
Save stuf/0fbc5a7942c35513e089 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script builds (a subset of) the AlkuThree-Light font | |
# from source files made public by Opetushallitus (oph.fi). | |
# Whether or not this infringes on copyrights or other rights | |
# is anyone's guess. | |
# | |
# Prerequisites: wget & fontforge | |
# Optionally: fonttools (ttx) for repeatable builds | |
# (sha1 should probably be 5d2eba6728246b7050500b3c8cac4780f99f4728) | |
TTX=$(which ttx 2>/dev/null) | |
FFSCRIPT=$(mktemp) | |
echo ' | |
http://www.oph.fi/download/169033_suomi_ruotsi_kirjaimet.pdf | |
http://www.oph.fi/download/169034_numerot.pdf | |
http://www.oph.fi/download/169035_inarinsaame.pdf | |
http://www.oph.fi/download/169036_koltansaame.pdf | |
http://www.oph.fi/download/169037_pohjoissaame.pdf | |
http://www.oph.fi/download/169038_romani.pdf | |
http://www.oph.fi/download/169039_malliteksti.pdf | |
' | wget --no-verbose -nc -nd -P AlkuThree-PDFs -i - | |
echo ' | |
New() | |
i=1 | |
while ( i<$argc ) | |
MergeFonts($argv[i]) | |
i = i+1 | |
endloop | |
SetFontNames("AlkuThree-Light", "AlkuThree", "AlkuThree-Light", "Light", "-") | |
Generate("AlkuThree-Light.otf") | |
' > $FFSCRIPT && fontforge -nosplash -script $FFSCRIPT AlkuThree-PDFs/*.pdf && rm $FFSCRIPT | |
if [[ -f $TTX ]]; then | |
$TTX -x head -x FFTM -o AlkuThree-Light.ttx AlkuThree-Light.otf | |
$TTX -o AlkuThree-Light.otf AlkuThree-Light.ttx | |
rm AlkuThree-Light.ttx | |
fi | |
sha1sum *.otf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment