Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
venv
*.swp
*.swo
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
83 changes: 83 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/bin/sh

# -------------------------------------------------------------------
# UPDATE THIS VARIABLE ----------------------------------------------

# thisFont="Spartan" # must match the name in the font file, e.g. FiraCode-VF.ttf needs the variable "FiraCode"

# -------------------------------------------------------------------
# Update the following as needed ------------------------------------
set -e


echo "Generating VFs"
# mkdir -p ./fonts/variable
fontmake -g source/Spartan.glyphs -o variable --round-instances --output-path ./fonts/Spartan\[wght\].ttf



echo "Generating Statics" ##run fixes on statics as well.

fontmake -g source/Spartan.glyphs -o ttf --round-instances -a --keep-direction -i --output-dir ./fonts/static/


echo "Statics Built" ##run fixes on statics as well.

echo "Removing Build UFOS"

rm -rf master_ufo/ instance_ufo/

echo "Build UFOS Removed"

echo "Post processing"

vfs=$(ls ./fonts/*.ttf)
for vf in $vfs
do
gftools fix-dsig -f $vf;
gftools fix-nonhinting $vf "$vf.fix";
mv "$vf.fix" $vf;
ttx -f -x "MVAR" $vf; # Drop MVAR. Table has issue in DW
rtrip=$(basename -s .ttf $vf)
new_file=./fonts/$rtrip.ttx;
rm $vf;
ttx $new_file
rm ./fonts/*.ttx
done
rm ./fonts/*backup*.ttf


stat=$(ls ./fonts/static/*.ttf)
for st in $stat
do
gftools fix-dsig -f $st;
gftools fix-hinting $st; #if this doesn't work rename as done above and figure diff solution.
mv "$st.fix" $st;
ttx -f -x "MVAR" $st; # Drop MVAR. Table has issue in DW
rtrip=$(basename -s .ttf $st)
new_file=./fonts/static/$rtrip.ttx;
rm $st;
ttx $new_file
rm ./fonts/static/*.ttx
done
# rm ./fonts/vf/static/*backup*.ttf





echo "fix vf meta? ok let's try that. I'm trying to fix VF meta"
gftools fix-vf-meta $vfs;
for vf in $vfs
do
mv "$vf.fix" $vf;
done

echo "Post processing complete"

# echo "running fb"
# fontbakery check-googlefonts ./fonts/vf/*.ttf --ghmarkdown SpartanChecks.md
# echo "finish vf check"
# echo "show dir now run static fb checks"
# fontbakery check-googlefonts ./fonts/vf/static/*.ttf --ghmarkdown SpartanStaticChecks.md
# echo "fb checks done"
Binary file added fonts/otf/Spartan-Black.otf
Binary file not shown.
Binary file added fonts/otf/Spartan-Bold.otf
Binary file not shown.
Binary file added fonts/otf/Spartan-ExtraBold.otf
Binary file not shown.
Binary file added fonts/otf/Spartan-ExtraLight.otf
Binary file not shown.
Binary file added fonts/otf/Spartan-Light.otf
Binary file not shown.
Binary file added fonts/otf/Spartan-Medium.otf
Binary file not shown.
Binary file added fonts/otf/Spartan-Regular.otf
Binary file not shown.
Binary file added fonts/otf/Spartan-SemiBold.otf
Binary file not shown.
Binary file added fonts/otf/Spartan-Thin.otf
Binary file not shown.
Binary file added fonts/ttf/Spartan-Black.ttf
Binary file not shown.
Binary file added fonts/ttf/Spartan-Bold.ttf
Binary file not shown.
Binary file added fonts/ttf/Spartan-ExtraBold.ttf
Binary file not shown.
Binary file added fonts/ttf/Spartan-ExtraLight.ttf
Binary file not shown.
Binary file added fonts/ttf/Spartan-Light.ttf
Binary file not shown.
Binary file added fonts/ttf/Spartan-Medium.ttf
Binary file not shown.
Binary file added fonts/ttf/Spartan-Regular.ttf
Binary file not shown.
Binary file added fonts/ttf/Spartan-SemiBold.ttf
Binary file not shown.
Binary file added fonts/ttf/Spartan-Thin.ttf
Binary file not shown.
Binary file added fonts/variable/Spartan[wght].ttf
Binary file not shown.
1 change: 1 addition & 0 deletions fonts/variable/local.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file added fonts/webfonts/Spartan-Black.woff2
Binary file not shown.
Binary file added fonts/webfonts/Spartan-Bold.woff2
Binary file not shown.
Binary file added fonts/webfonts/Spartan-ExtraBold.woff2
Binary file not shown.
Binary file added fonts/webfonts/Spartan-ExtraLight.woff2
Binary file not shown.
Binary file added fonts/webfonts/Spartan-Light.woff2
Binary file not shown.
Binary file added fonts/webfonts/Spartan-Medium.woff2
Binary file not shown.
Binary file added fonts/webfonts/Spartan-Regular.woff2
Binary file not shown.
Binary file added fonts/webfonts/Spartan-SemiBold.woff2
Binary file not shown.
Binary file added fonts/webfonts/Spartan-Thin.woff2
Binary file not shown.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gftools==0.8.8
Loading