14
0
mirror of https://github.com/belluzj/fantasque-sans.git synced 2024-12-22 23:41:30 +01:00

small changes plus generation of some TeX files

This commit is contained in:
Jany Belluz 2013-11-30 21:29:09 +01:00
parent e126ed62b5
commit 0778f43d36
8 changed files with 691 additions and 688 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
TeX
*.zip *.zip
*.deb *.deb
*.rpm *.rpm

Binary file not shown.

Binary file not shown.

View File

@ -7,6 +7,7 @@ OTF_FILES=$(patsubst %,OTF/%.otf,$(BASENAMES))
all: zip all: zip
OTF/%.otf %.ttf: Sources/%.sfd OTF/%.otf %.ttf: Sources/%.sfd
mkdir -p OTF TeX
./validate-generate.sh $* ./validate-generate.sh $*
# TODO determine perfect parameters # TODO determine perfect parameters
ttfautohint $*.ttf $*.hinted.ttf ttfautohint $*.ttf $*.hinted.ttf
@ -21,5 +22,5 @@ zip: $(TTF_FILES) $(OTF_FILES) $(SOURCES)
zip CosmicSansNeueMono.zip OFL.txt README.md $^ zip CosmicSansNeueMono.zip OFL.txt README.md $^
clean: clean:
rm $(TTF_FILES) $(OTF_FILES) rm -f *.ttf OTF/* TeX/*

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -3,17 +3,14 @@
basename=$1 basename=$1
ttf="${basename}.ttf" ttf="${basename}.ttf"
otf="OTF/${basename}.otf" otf="OTF/${basename}.otf"
texFamily="cm" # arbitrary two letters out of the font's name
texCut="r" # Regular
if [[ "${basename,,}" == *bold* ]]; then
texCut="b" # Bold
fi
echo -e "\e[1;37mGenerating ${basename}... \e[0m" echo -e "\e[1;37mGenerating ${basename}... \e[0m"
if [ -f "$ttf" ]; then
rm "$ttf"
fi
if [ -f "$otf" ]; then
rm "$otf"
fi
fontforge -lang=py -script - <<EOF fontforge -lang=py -script - <<EOF
import fontforge; import fontforge;
@ -25,6 +22,11 @@ if bitmask != 0:
font.generate("${basename}.ttf"); font.generate("${basename}.ttf");
font.generate("OTF/${basename}.otf"); font.generate("OTF/${basename}.otf");
# TeX stuff
font.encoding = "AdobeStandard";
font.generate("TeX/f${texFamily}${texCut}8a.pfb",
flags=("afm", "tfm", "pfm"));
EOF EOF
error=$? error=$?