Update scripts for fresh gftools and cross-platform mktemp

This commit is contained in:
Nikita Prokopov 2023-01-17 18:35:09 +00:00
parent e19f63e0e9
commit a03fb501d3
2 changed files with 3 additions and 10 deletions

View File

@ -25,9 +25,6 @@ for weight in "${weights[@]}"; do
fontmake -g "${glyphs_file}" -o ttf --output-path "${file}" -i ".* ${weight}"
echo " [i] Fixing DSIG in ${file}"
gftools fix-dsig --autofix "${file}"
echo " [i] TTFautohint ${file}"
ttfautohint --no-info --ignore-restrictions "${file}" "${file}.hinted"
mv "${file}.hinted" "${file}"

View File

@ -18,7 +18,9 @@ mkdir -p "${dir}"
rm -rf "${dir:?}/"*
# make a temporary file here to avoid parallel runs from stepping on each other's toes
vf_glyphs=$(mktemp --suffix=".glyphs")
vf_glyphs=$(mktemp)
mv ${vf_glyphs} ${vf_glyphs}.glyphs
vf_glyphs=${vf_glyphs}.glyphs
awk '/name = Retina;/ { print; print "exports = 0;"; next }1' \
"${glyphs_file}" > "${vf_glyphs}"
@ -26,10 +28,6 @@ awk '/name = Retina;/ { print; print "exports = 0;"; next }1' \
fontmake -g "${vf_glyphs}" -o variable --output-path "${file}"
rm -f "${vf_glyphs}"
# fix variable font metadata very important
gftools fix-vf-meta "${file}"
mv "${file}.fix" "${file}"
# other fixes for metadata and hinting
gftools fix-nonhinting "${file}" "${file}.fix"
mv "${file}.fix" "${file}"
@ -37,8 +35,6 @@ mv "${file}.fix" "${file}"
gftools fix-gasp --autofix "${file}"
mv "${file}.fix" "${file}"
gftools fix-dsig --autofix "${file}"
# cleanup of temp files
rm -rf "${dir}/"*-gasp.ttf