mirror of
https://github.com/tonsky/FiraCode.git
synced 2024-10-05 17:17:34 +03:00
port VF metadata fixes from move to build script
This commit is contained in:
parent
11f505faa6
commit
b29e3f3e08
40
build.sh
40
build.sh
@ -1,19 +1,47 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
source venv/bin/activate
|
||||
|
||||
# ============================================================================
|
||||
# VARIABLE FONT ==============================================================
|
||||
|
||||
# variable font
|
||||
rm -rf distr/variable_ttf
|
||||
fontmake -g FiraCode.glyphs -o variable --output-dir distr/variable_ttf
|
||||
|
||||
# statics
|
||||
# -------------------------------------------------------------
|
||||
# fix variable font metadata as needed ------------------------
|
||||
|
||||
firaCodeVF=distr/variable_ttf/FiraCode-VF.ttf
|
||||
|
||||
# fix variable font metadata – very important
|
||||
gftools fix-vf-meta $firaCodeVF
|
||||
|
||||
# other fixes for metadata and hinting
|
||||
gftools fix-nonhinting $firaCodeVF $firaCodeVF
|
||||
gftools fix-gasp --autofix $firaCodeVF
|
||||
gftools fix-dsig --autofix $firaCodeVF
|
||||
|
||||
# cleanup of temp files
|
||||
tempFiles=$(ls distr/variable_ttf/*.fix && ls distr/variable_ttf/*-gasp*)
|
||||
for temp in $tempFiles
|
||||
do
|
||||
rm -rf $temp
|
||||
done
|
||||
|
||||
# TODO (late 2019?): use TTFautohint-VF for variable font (current support is minimal)
|
||||
|
||||
# ============================================================================
|
||||
# STATIC FONTS ===============================================================
|
||||
|
||||
rm -rf distr/ttf
|
||||
fontmake -g FiraCode.glyphs -o ttf --output-dir distr/ttf -i
|
||||
|
||||
rm -rf distr/otf
|
||||
fontmake -g FiraCode.glyphs -o otf --output-dir distr/otf -i
|
||||
|
||||
# ============================================================================
|
||||
# Autohinting ================================================================
|
||||
# -------------------------------------------------------------
|
||||
# Autohinting -------------------------------------------------
|
||||
|
||||
statics=$(ls distr/ttf/*.ttf)
|
||||
for file in $statics; do
|
||||
@ -32,7 +60,7 @@ done
|
||||
# ============================================================================
|
||||
# Build woff2 fonts ==========================================================
|
||||
|
||||
# requires https://github.com/google/woff2
|
||||
# requires woff2_compress (get from https://github.com/bramstein/homebrew-webfonttools)
|
||||
|
||||
rm -rf distr/woff2
|
||||
|
||||
@ -50,7 +78,7 @@ done
|
||||
# ============================================================================
|
||||
# Build woff fonts ===========================================================
|
||||
|
||||
# requires sfnt2woff-zopfli (https://github.com/bramstein/homebrew-webfonttools)
|
||||
# requires sfnt2woff-zopfli (get from https://github.com/bramstein/homebrew-webfonttools)
|
||||
|
||||
rm -rf distr/woff
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -32,31 +32,6 @@ ttx -t head $firaCodeVF
|
||||
fontVersion=v$(xml sel -t --match "//*/fontRevision" -v "@value" ${firaCodeVF/".ttf"/".ttx"})
|
||||
rm ${firaCodeVF/".ttf"/".ttx"}
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# fix variable font metadata as needed ------------------------------
|
||||
|
||||
# TODO: Add gftools scripts as needed
|
||||
|
||||
# TODO: test VFs with TTFautohint-VF vs no hinting
|
||||
|
||||
gftools fix-nonhinting $firaCodeVF $firaCodeVF
|
||||
|
||||
# TODO: decide if `--autofix` is really the best option, or if we should assert more control
|
||||
gftools fix-gasp --autofix $firaCodeVF
|
||||
|
||||
gftools fix-dsig --autofix $firaCodeVF
|
||||
|
||||
# fix variable font metadata
|
||||
gftools fix-vf-meta $firaCodeVF
|
||||
|
||||
# cleanup
|
||||
tempFiles=$(ls distr/variable_ttf/*.fix && ls distr/variable_ttf/*-gasp*)
|
||||
for temp in $tempFiles
|
||||
do
|
||||
rm -rf $temp
|
||||
done
|
||||
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# navigate to google/fonts repo, then fira code branch --------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user