1
1
mirror of https://github.com/rsms/inter.git synced 2024-07-14 14:10:36 +03:00

make: Add googlefonts Makefile target (#678)

This commit is contained in:
Marc Foley 2024-05-15 16:28:39 +01:00 committed by GitHub
parent 1cd81b8cfb
commit bde6fa1677
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 809 additions and 703 deletions

View File

@ -233,6 +233,14 @@ var: \
$(FONTDIR)/var/InterVariable.ttf \
$(FONTDIR)/var/InterVariable-Italic.ttf
googlefonts: var
. $(VENV) ; gftools fix-family $(FONTDIR)/var/*.ttf \
--rename-family "Inter" \
--include-source-fixes \
-o $(FONTDIR)/googlefonts;
. $(VENV) ; gftools fontsetter $(FONTDIR)/googlefonts/Inter[opsz,wght].ttf src/googlefonts-fixes.yaml -o $(FONTDIR)/googlefonts/Inter[opsz,wght].ttf;
. $(VENV) ; gftools fontsetter $(FONTDIR)/googlefonts/Inter-Italic[opsz,wght].ttf src/googlefonts-fixes.yaml -o $(FONTDIR)/googlefonts/Inter-Italic[opsz,wght].ttf;
var_web: \
$(FONTDIR)/var/InterVariable.woff2 \
$(FONTDIR)/var/InterVariable-Italic.woff2
@ -299,7 +307,7 @@ static_ttf: $(STATIC_FONTS_TTF)
static_web: $(STATIC_FONTS_WEB)
static_web_hinted: $(STATIC_FONTS_WEB_HINTED)
all: var static web static_otf
all: var googlefonts static web static_otf
.PHONY: \
all var var_web web \
@ -418,6 +426,7 @@ zip_beta: \
# - step2 runs tests, then makes a zip archive and updates the website (docs/ dir.)
DIST_ZIP = build/release/Inter-${VERSION}.zip
DIST_ZIP_GF = $(SRCDIR)/build/release/Inter-$(VERSION)-GoogleFonts.zip
dist:
@echo "——————————————————————————————————————————————————————————————————"
@ -437,13 +446,15 @@ dist:
$(MAKE) -f $(MAKEFILE) -j$(nproc) clean
$(MAKE) -f $(MAKEFILE) -j$(nproc) all
$(MAKE) -f $(MAKEFILE) -j$(nproc) test
$(MAKE) -f $(MAKEFILE) -j$(nproc) dist_zip dist_docs
$(MAKE) -f $(MAKEFILE) -j$(nproc) dist_zip dist_zip_gf dist_docs
$(MAKE) -f $(MAKEFILE) dist_postflight
dist_zip: | venv
@#. $(VENV) ; python misc/tools/patch-version.py misc/dist/inter.css
bash misc/makezip2.sh -reveal-in-finder "$(DIST_ZIP)"
dist_zip_gf: | venv
cd "$(FONTDIR)/googlefonts" && zip -q -X -r "$(DIST_ZIP_GF)" *.ttf
dist_docs:
$(MAKE) -C docs -j$(nproc) dist

View File

@ -10,15 +10,16 @@ ufo2ft = "==2.30.0"
fontmake = "==3.5.*"
fontbakery = "==0.10.4"
skia-pathops = "==0.8.*"
gftools = "==0.9.*"
gftools = "==0.9.57"
glyphspkg = "==0.1.*"
brotli = "==1.0.*"
psautohint = "==2.4.*"
pipfile = "*"
[dev-packages]
# Mainly due to https://pypi.org/project/fonttools/
# > FontTools requires Python 3.8 or later. We try to follow the same schedule
# > of minimum Python version support as NumPy (see NEP 29).
[requires]
python_version = "3.8"

1487
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,7 @@ cp build/fonts/var/InterVariable-Italic.ttf "$ZIPDIR/InterVariable-Italic.ttf"
cp build/fonts/static/Inter*.woff2 "$ZIPDIR/web/" &
cp build/fonts/var/InterVariable.woff2 "$ZIPDIR/web/InterVariable.woff2"
cp build/fonts/var/InterVariable-Italic.woff2 "$ZIPDIR/web/InterVariable-Italic.woff2"
cp misc/dist/inter.css "$ZIPDIR/web/"
cp misc/dist/inter.css "$ZIPDIR/web/"
. build/venv/bin/activate
python misc/tools/patch-version.py "$ZIPDIR/web/inter.css"

View File

@ -0,0 +1 @@
name->setName: ["Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)", 0, 3, 1, 0x409]