From a03fb501d33f17e9d9d5fe133188b629def42063 Mon Sep 17 00:00:00 2001 From: Nikita Prokopov Date: Tue, 17 Jan 2023 18:35:09 +0000 Subject: [PATCH] Update scripts for fresh gftools and cross-platform mktemp --- script/build_ttf.sh | 3 --- script/build_variable.sh | 10 +++------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/script/build_ttf.sh b/script/build_ttf.sh index e9af987..59c6e48 100755 --- a/script/build_ttf.sh +++ b/script/build_ttf.sh @@ -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}" diff --git a/script/build_variable.sh b/script/build_variable.sh index a2389ad..311ac60 100755 --- a/script/build_variable.sh +++ b/script/build_variable.sh @@ -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