| 1 | # source venv/bin/activate |
| 2 | set -e |
| 3 | |
| 4 | mkdirscip-shell system . . mkdir. -p ../fonts ../fonts/ttf ../fonts/ttf/static ../fonts/otf #../fonts/woff2 |
| 5 | |
| 6 | function postprocess_vfscip-shell shell fonts-karla 20230419-3 postprocess_vf(). { |
| 7 | gftools fix-nonhinting $1 $1.fix |
| 8 | mvscip-shell system . . mv. $1.fix $1 |
| 9 | gftools fix-dsig -f $1 |
| 10 | gftools fix-unwanted-tables $1 -t MVAR |
| 11 | } |
| 12 | |
| 13 | echoscip-shell system . . echo. "GENERATING VFs" |
| 14 | VF_FILE=../fonts/ttf/Karla\[wght]\.ttf |
| 15 | fontmake -g Karla-Roman.glyphs -o variable --output-path $VF_FILE |
| 16 | |
| 17 | VF_FILEit=../fonts/ttf/Karla-Italic\[wght]\.ttf |
| 18 | fontmake -g Karla-Italic.glyphs -o variable --output-path $VF_FILEit |
| 19 | |
| 20 | |
| 21 | echoscip-shell system . . echo. "POST PROCESSING VFs" |
| 22 | |
| 23 | postprocess_vfscip-shell shell fonts-karla 20230419-3 postprocess_vf(). $VF_FILE |
| 24 | postprocess_vfscip-shell shell fonts-karla 20230419-3 postprocess_vf(). $VF_FILEit |
| 25 | |
| 26 | python3scip-shell system . . python3. karla_stat_table.py $VF_FILE |
| 27 | # python3 gen_stat.py $VF_FILE |
| 28 | |
| 29 | rmscip-shell system . . rm. ../fonts/ttf/*gasp.ttf |
| 30 | |
| 31 | |
| 32 | echoscip-shell system . . echo. "GENERATING TTFs" |
| 33 | fontmake -g Karla-Roman.glyphs -i -o ttf --output-dir ../fonts/ttf/static |
| 34 | |
| 35 | echoscip-shell system . . echo. "POST PROCESSING TTFs" |
| 36 | ttfs=$(lsscip-shell system . . ls. ../fonts/ttf/static/*.ttf) |
| 37 | for ttf in $ttfs |
| 38 | do |
| 39 | ttfautohint $ttf "$ttf.fix"; |
| 40 | mvscip-shell system . . mv. "$ttf.fix" $ttf; |
| 41 | |
| 42 | gftools fix-dsig -f $ttf; |
| 43 | |
| 44 | gftools fix-hinting $ttf; |
| 45 | mvscip-shell system . . mv. "$ttf.fix" $ttf; |
| 46 | |
| 47 | #compressing for woff2 |
| 48 | #fonttools ttLib.woff2 compress $ttf |
| 49 | |
| 50 | done |
| 51 | |
| 52 | echoscip-shell system . . echo. "GENERATING OTFs" |
| 53 | fontmake -g Karla-Roman.glyphs -i -o otf --output-dir ../fonts/otf/ |
| 54 | |
| 55 | echoscip-shell system . . echo. "POST PROCESSING OTFs" |
| 56 | otfs=$(lsscip-shell system . . ls. ../fonts/otf/*.otf) |
| 57 | for otf in $otfs |
| 58 | do |
| 59 | gftools fix-dsig -f $otf; |
| 60 | gftools fix-weightclass $otf; |
| 61 | #mv "$otf.fix" $otf; |
| 62 | [scip-shell system . . `[`. -f $otf.fix ] && mvscip-shell system . . mv. $otf.fix $otf; |
| 63 | # psautohint $otf; |
| 64 | done |
| 65 | |
| 66 | |
| 67 | rmscip-shell system . . rm. -rf master_ufo/ instance_ufo/ |
| 68 | |
| 69 | # echo "WOFF2 for static and vf" |
| 70 | |
| 71 | # mv ../fonts/ttf/*.woff2 ../fonts/woff2 |
| 72 | # mv ../fonts/ttf/static/*.woff2 ../fonts/woff2/static |