Permalink
Browse files

Major overhaul, moving from UFO2 to Glyphs and UFO3, plus a brand new…

… and much simpler fontbuild
  • Loading branch information...
rsms committed Sep 3, 2018
1 parent 8c1a4c1 commit c833e252c925e8dd68108660710ca835d95daa6f
Showing 5,246 changed files with 346,944 additions and 163,490 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
@@ -11,7 +11,6 @@
_*.ignore _*.ignore
*~ *~
.DS_Store .DS_Store
*.sparseimage
nohup.out nohup.out
build build
117 Makefile
@@ -10,71 +10,88 @@
# install Build all (web, ttf and otf) and install. Mac-only for now. # install Build all (web, ttf and otf) and install. Mac-only for now.
# dist Create a new release distribution. Does everything. # dist Create a new release distribution. Does everything.
# #
all: all_ttf all_otf all: all_fonts
$(MAKE) all_web -j all_unhinted: all_ttf all_otf all_web
all_hinted: all_ttf_hinted all_web_hinted
all_hinted: all_ttf all_ttf_hinted all_otf VERSION := $(shell cat version.txt)
$(MAKE) all_web_hinted -j
VERSION := $(shell misc/version.py) export PATH := $(PWD)/build/venv/bin:$(PATH)
# generated.make is automatically generated by init.sh and defines depenencies for # generated.make is automatically generated by init.sh and defines depenencies for
# all styles and alias targets # all styles and alias targets
include build/etc/generated.make include build/etc/generated.make
res_files := src/fontbuild.cfg src/diacritics.txt src/glyphlist.txt \
src/features.fea src/glyphorder.txt
# UFO -> TTF & OTF (note that UFO deps are defined by generated.make) # TTF -> WOFF2
build/tmp/InterUITTF/InterUI-%.ttf: $(res_files) build/%.woff2: build/%.ttf
misc/ufocompile --otf $* woff2_compress "$<"
# TTF -> WOFF
build/%.woff: build/%.ttf
ttf2woff -O -t woff "$<" "$@"
# TTF -> EOT (disabled)
# build/%.eot: build/%.ttf
# ttf2eot "$<" > "$@"
# UFO -> OTF, TTF
build/unhinted/Inter-UI-Regular.%: master_ufo_regular
misc/fontbuild compile -o $@ src/Inter-UI-Regular.ufo
build/unhinted/Inter-UI-Black.%: master_ufo_black
misc/fontbuild compile -o $@ src/Inter-UI-Black.ufo
build/unhinted/Inter-UI-%.otf: build/ufo/Inter-UI-%.ufo
misc/fontbuild compile -o $@ $<
build/tmp/InterUIOTF/InterUI-%.otf: build/tmp/InterUITTF/InterUI-%.ttf $(res_files) build/unhinted/Inter-UI-%.ttf: build/ufo/Inter-UI-%.ufo
@true misc/fontbuild compile -o $@ $<
# tmp/ttf -> dist
build/dist-unhinted/Inter-UI-%.ttf: build/tmp/InterUITTF/InterUI-%.ttf
@mkdir -p build/dist-unhinted
cp -a "$<" "$@"
# tmp/otf -> dist # designspace <- glyphs file
build/dist-unhinted/Inter-UI-%.otf: build/tmp/InterUIOTF/InterUI-%.otf src/Inter-UI.designspace: src/Inter-UI.glyphs
@mkdir -p build/dist-unhinted misc/fontbuild glyphsync $<
cp -a "$<" "$@"
# autohint # instance UFOs <- master UFOs
build/dist-hinted/Inter-UI-%.ttf: build/dist-unhinted/Inter-UI-%.ttf build/ufo/Inter-UI-%.ufo: master_ufo_regular master_ufo_black
@mkdir -p build/dist-hinted misc/fontbuild instancegen src/Inter-UI.designspace $*
ttfautohint \
# master UFOs <- designspace
master_ufo_regular: src/Inter-UI.designspace $(Regular_ufo_d)
master_ufo_black: src/Inter-UI.designspace $(Black_ufo_d)
# Note: The seemingly convoluted dependency graph above is required to
# make sure that glyphsync and instancegen are not run in parallel.
.PHONY: master_ufo_regular master_ufo_black
# hinted TTF files via autohint
build/hinted/%.ttf: build/unhinted/%.ttf
@mkdir -p build/hinted
@echo ttfautohint "$<" "$@"
@ttfautohint \
--hinting-limit=256 \ --hinting-limit=256 \
--hinting-range-min=8 \ --hinting-range-min=8 \
--hinting-range-max=64 \ --hinting-range-max=64 \
--fallback-stem-width=256 \ --fallback-stem-width=256 \
--strong-stem-width=D \
--no-info \ --no-info \
--verbose \ --verbose \
"$<" "$@" "$<" "$@"
# TTF -> WOFF2 # test runs all tests
build/%.woff2: build/%.ttf # Note: all_check is generated by init.sh and runs "fontbuild checkfont"
woff2_compress "$<" # on all otf and ttf files.
test: all_check
# TTF -> WOFF
build/%.woff: build/%.ttf
ttf2woff -O -t woff "$<" "$@"
# TTF -> EOT (disabled)
# build/%.eot: build/%.ttf
# ttf2eot "$<" > "$@"
test: all_otf
@misc/check-font.py build/dist-unhinted/*.otf
ZIP_FILE_DIST := build/release/Inter-UI-${VERSION}.zip ZIP_FILE_DIST := build/release/Inter-UI-${VERSION}.zip
ZIP_FILE_DEV := build/release/Inter-UI-${VERSION}-$(shell git rev-parse --short=10 HEAD).zip ZIP_FILE_DEV := build/release/Inter-UI-${VERSION}-$(shell git rev-parse --short=10 HEAD).zip
# zip intermediate # zip intermediate
build/.zip.zip: all_otf build/.zip.zip: all_otf all_ttf
$(MAKE) all_web all_web_hinted -j $(MAKE) all_web all_web_hinted -j
@rm -rf build/.zip @rm -rf build/.zip
@rm -f build/.zip.zip @rm -f build/.zip.zip
@@ -84,15 +101,15 @@ build/.zip.zip: all_otf
"build/.zip/Inter UI (TTF)" \ "build/.zip/Inter UI (TTF)" \
"build/.zip/Inter UI (TTF hinted)" \ "build/.zip/Inter UI (TTF hinted)" \
"build/.zip/Inter UI (OTF)" "build/.zip/Inter UI (OTF)"
@cp -a build/dist-unhinted/*.woff build/dist-unhinted/*.woff2 \ @cp -a build/unhinted/*.woff build/unhinted/*.woff2 \
"build/.zip/Inter UI (web)/" "build/.zip/Inter UI (web)/"
@cp -a misc/doc/inter-ui.css "build/.zip/Inter UI (web)/" @cp -a misc/doc/inter-ui.css "build/.zip/Inter UI (web)/"
@cp -a build/dist-hinted/*.woff build/dist-hinted/*.woff2 \ @cp -a build/hinted/*.woff build/hinted/*.woff2 \
"build/.zip/Inter UI (web hinted)/" "build/.zip/Inter UI (web hinted)/"
@cp -a misc/doc/inter-ui.css "build/.zip/Inter UI (web hinted)/" @cp -a misc/doc/inter-ui.css "build/.zip/Inter UI (web hinted)/"
@cp -a build/dist-unhinted/*.ttf "build/.zip/Inter UI (TTF)/" @cp -a build/unhinted/*.ttf "build/.zip/Inter UI (TTF)/"
@cp -a build/dist-hinted/*.ttf "build/.zip/Inter UI (TTF hinted)/" @cp -a build/hinted/*.ttf "build/.zip/Inter UI (TTF hinted)/"
@cp -a build/dist-unhinted/*.otf "build/.zip/Inter UI (OTF)/" @cp -a build/unhinted/*.otf "build/.zip/Inter UI (OTF)/"
@cp -a misc/doc/*.txt "build/.zip/" @cp -a misc/doc/*.txt "build/.zip/"
@cp -a LICENSE.txt "build/.zip/" @cp -a LICENSE.txt "build/.zip/"
cd build/.zip && zip -v -X -r "../../build/.zip.zip" * >/dev/null && cd ../.. cd build/.zip && zip -v -X -r "../../build/.zip.zip" * >/dev/null && cd ../..
@@ -133,28 +150,28 @@ dist: zip_dist
copy_docs_fonts: copy_docs_fonts:
rm -rf docs/font-files rm -rf docs/font-files
mkdir docs/font-files mkdir docs/font-files
cp -a build/dist-unhinted/*.woff build/dist-unhinted/*.woff2 build/dist-unhinted/*.otf docs/font-files/ cp -a build/unhinted/*.woff build/unhinted/*.woff2 build/unhinted/*.otf docs/font-files/
install_ttf: all_ttf_unhinted install_ttf: all_ttf_unhinted
$(MAKE) all_web -j $(MAKE) all_web -j
@echo "Installing TTF files locally at ~/Library/Fonts/Inter UI" @echo "Installing TTF files locally at ~/Library/Fonts/Inter UI"
rm -rf ~/'Library/Fonts/Inter UI' rm -rf ~/'Library/Fonts/Inter UI'
mkdir -p ~/'Library/Fonts/Inter UI' mkdir -p ~/'Library/Fonts/Inter UI'
cp -va build/dist-unhinted/*.ttf ~/'Library/Fonts/Inter UI' cp -va build/unhinted/*.ttf ~/'Library/Fonts/Inter UI'
install_ttf_hinted: all_ttf install_ttf_hinted: all_ttf
$(MAKE) all_web -j $(MAKE) all_web -j
@echo "Installing autohinted TTF files locally at ~/Library/Fonts/Inter UI" @echo "Installing autohinted TTF files locally at ~/Library/Fonts/Inter UI"
rm -rf ~/'Library/Fonts/Inter UI' rm -rf ~/'Library/Fonts/Inter UI'
mkdir -p ~/'Library/Fonts/Inter UI' mkdir -p ~/'Library/Fonts/Inter UI'
cp -va build/dist-hinted/*.ttf ~/'Library/Fonts/Inter UI' cp -va build/hinted/*.ttf ~/'Library/Fonts/Inter UI'
install_otf: all_otf install_otf: all_otf
$(MAKE) all_web -j $(MAKE) all_web -j
@echo "Installing OTF files locally at ~/Library/Fonts/Inter UI" @echo "Installing OTF files locally at ~/Library/Fonts/Inter UI"
rm -rf ~/'Library/Fonts/Inter UI' rm -rf ~/'Library/Fonts/Inter UI'
mkdir -p ~/'Library/Fonts/Inter UI' mkdir -p ~/'Library/Fonts/Inter UI'
cp -va build/dist-unhinted/*.otf ~/'Library/Fonts/Inter UI' cp -va build/unhinted/*.otf ~/'Library/Fonts/Inter UI'
install: install_otf install: install_otf
@@ -182,6 +199,6 @@ _local/UnicodeData.txt:
http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt
clean: clean:
rm -rf build/tmp/* build/dist-hinted build/dist-unhinted rm -rvf build/tmp build/hinted build/unhinted
.PHONY: all web clean install install_otf install_ttf deploy zip zip_dist pre_dist dist geninfo copy_docs_fonts all_hinted test .PHONY: all web clean install install_otf install_ttf deploy zip zip_dist pre_dist dist geninfo copy_docs_fonts all_hinted test glyphsync
Oops, something went wrong.

0 comments on commit c833e25

Please sign in to comment.