From 7e6fe28f0a1b7e99e8750cf3632eb264c488793c Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Mon, 30 Oct 2023 14:50:49 +0000 Subject: [PATCH 1/5] New build system --- Makefile | 11 ++-- fontbakery.yml | 13 +++++ requirements.txt | 121 ++++---------------------------------------- sources/config.yaml | 37 ++++++++++++-- 4 files changed, 60 insertions(+), 122 deletions(-) create mode 100644 fontbakery.yml diff --git a/Makefile b/Makefile index 45545c8..682cf09 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -SOURCES=$(shell python3 scripts/read-config.py --sources ) -FAMILY=$(shell python3 scripts/read-config.py --family ) +SOURCES=sources/TASSh.glyphs +FAMILY=TAS School Hand DRAWBOT_SCRIPTS=$(shell ls documentation/*.py) DRAWBOT_OUTPUT=$(shell ls documentation/*.py | sed 's/\.py/.png/g') @@ -18,20 +18,17 @@ build: build.stamp venv: venv/touchfile -build.stamp: venv .init.stamp sources/config.yaml $(SOURCES) +build.stamp: venv sources/config.yaml $(SOURCES) rm -rf fonts (for config in sources/config*.yaml; do . venv/bin/activate; gftools builder $$config; done) && touch build.stamp -.init.stamp: venv - . venv/bin/activate; python3 scripts/first-run.py - venv/touchfile: requirements.txt test -d venv || python3 -m venv venv . venv/bin/activate; pip install -Ur requirements.txt touch venv/touchfile test: venv build.stamp - . venv/bin/activate; mkdir -p out/ out/fontbakery; fontbakery check-googlefonts -l WARN --full-lists --succinct --badges out/badges --html out/fontbakery/fontbakery-report.html --ghmarkdown out/fontbakery/fontbakery-report.md $(shell find fonts/ttf -type f) || echo '::warning file=sources/config.yaml,title=Fontbakery failures::The fontbakery QA check reported errors in your font. Please check the generated report.' + . venv/bin/activate; mkdir -p out/ out/fontbakery; fontbakery check-googlefonts --config fontbakery.yml -l WARN --full-lists --succinct --badges out/badges --html out/fontbakery/fontbakery-report.html --ghmarkdown out/fontbakery/fontbakery-report.md $(shell find fonts/ttf -type f) || echo '::warning file=sources/config.yaml,title=Fontbakery failures::The fontbakery QA check reported errors in your font. Please check the generated report.' proof: venv build.stamp . venv/bin/activate; mkdir -p out/ out/proof; diffenator2 proof $(shell find fonts/ttf -type f) -o out/proof diff --git a/fontbakery.yml b/fontbakery.yml new file mode 100644 index 0000000..f4f3ea1 --- /dev/null +++ b/fontbakery.yml @@ -0,0 +1,13 @@ +exclude_checks: + - com.google.fonts/check/fontdata_namecheck + - com.google.fonts/check/vertical_metrics_regressions + - com.google.fonts/check/cjk_vertical_metrics_regressions + - com.google.fonts/check/shaping/regression + - com.google.fonts/check/outline_alignment_mis + - com.google.fonts/check/outline_short_segments + - com.google.fonts/check/outline_colinear_vectors + - com.google.fonts/check/outline_jaggy_segments + - com.google.fonts/check/outline_semi_vertical + - com.google.fonts/check/name/family_name_compliance + - com.google.fonts/check/whitespace_ink + - com.google.fonts/check/contour_count diff --git a/requirements.txt b/requirements.txt index 78daaf4..89e58c4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,111 +1,10 @@ -absl-py==2.0.0 -appdirs==1.4.4 -attrs==23.1.0 -axisregistry==0.4.3 -babelfont==3.0.1 -beziers==0.5.0 -blackrenderer==0.6.0 -booleanOperations==0.9.0 -Brotli==1.1.0 -bump2version==1.0.1 -bumpfontversion==0.4.1 -cattrs==23.1.2 -certifi==2023.7.22 -cffi==1.16.0 -cffsubr==0.2.9.post1 -charset-normalizer==3.2.0 -click==8.1.7 -cmarkgfm==2022.10.27 -colorlog==6.7.0 -compreffor==0.5.5 -cryptography==41.0.4 -cu2qu==1.6.7.post2 -defcon==0.10.3 -Deprecated==1.2.14 -diffenator2==0.2.13 -drawbot-skia==0.5.0 -exceptiongroup==1.1.3 -font-v==2.1.0 -fontbakery==0.9.2 -fontFeatures==1.8.0 -fontmake==3.7.1 -fontMath==0.9.3 -fonttools==4.43.0 -freetype-py==2.3.0 -fs==2.4.16 -gflanguages==0.5.7 -gftools==0.9.34 -gitdb==4.0.10 -GitPython==3.1.37 -glyphsets==0.6.4 -glyphsLib==6.4.1 -h11==0.14.0 -hyperglot==0.4.5 -idna==3.4 -Jinja2==3.1.2 -lxml==4.9.3 -markdown-it-py==3.0.0 -MarkupSafe==2.1.3 -mdurl==0.1.2 -munkres==1.1.4 -nanoemoji==0.15.1 -ninja==1.11.1 -numpy==1.26.0 -openstep-plist==0.3.1 -opentype-sanitizer==9.1.0 -opentypespec==1.9.1 -orjson==3.9.7 -outcome==1.2.0 -packaging==23.1 -picosvg==0.22.1 -Pillow==10.0.1 -pip-api==0.0.30 -pngquant-cli==2.17.0.post5 -protobuf==3.20.3 -pyahocorasick==2.0.0 -pybind11==2.11.1 -pyclipper==1.3.0.post5 -pycparser==2.21 -pygit2==1.13.1 -PyGithub==2.1.1 -Pygments==2.16.1 -PyJWT==2.8.0 -PyNaCl==1.5.0 -pyparsing==3.1.1 -PySocks==1.7.1 -python-bidi==0.4.2 -python-dateutil==2.8.2 -PyYAML==6.0.1 -regex==2023.8.8 -requests==2.31.0 -resvg-cli==0.22.0.post3 -rich==13.5.3 -selenium==4.13.0 -sh==2.0.6 -six==1.16.0 -skia-pathops==0.8.0.post1 -skia-python==87.5 -smmap==5.0.1 -sniffio==1.3.0 -sortedcontainers==2.4.0 -statmake==0.6.0 -strictyaml==1.7.3 -tabulate==0.9.0 -toml==0.10.2 -tqdm==4.66.1 -trio==0.22.2 -trio-websocket==0.11.1 -ttfautohint-py==0.5.1 -typing_extensions==4.8.0 -ufo2ft==2.33.4 -ufoLib2==0.16.0 -uharfbuzz==0.37.3 -unicodedata2==15.1.0 -Unidecode==1.3.7 -urllib3==2.0.5 -vharfbuzz==0.2.0 -vttLib==0.12.0 -wrapt==1.15.0 -wsproto==1.2.0 -youseedee==0.3.0 -zopfli==0.2.3 +fontmake>=2.4 +fontbakery>=0.8.11 +gftools @ git+https://github.com/googlefonts/gftools@builder2 +fontprimer @ git+https://github.com/simoncozens/fontprimer +gftools[qa]>=0.9.23 +drawbot-skia>=0.4.8 +sh>=1.14.2 +bumpfontversion>=0.2.0 +diffenator2>=0.2.5 +opentype-feature-freezer diff --git a/sources/config.yaml b/sources/config.yaml index 4dd7943..bb21c65 100644 --- a/sources/config.yaml +++ b/sources/config.yaml @@ -1,5 +1,34 @@ +recipeProvider: fontprimer sources: - - TasSh.glyphs -axisOrder: - - wght -familyName: TasSh \ No newline at end of file +- TASSh.glyphs +shortFamilyName: TAS +variants: + - name: Precursive + alias: Pre + steps: + - operation: featureFreeze + args: -f ss01 + - name: Outline + steps: + - operation: featureFreeze + args: -f ss02 + - name: Cursive + steps: + - operation: featureFreeze + args: -f ss03 + - name: Starters + steps: + - operation: featureFreeze + args: -f ss04 + - name: Outline Arrows + alias: Arrows + steps: + - operation: featureFreeze + args: -f ss05 + - name: Dotted + steps: + - operation: featureFreeze + args: -f ss06 +doGuidelines: true +buildStatic: true +buildColorVariable: true From 5a113a456537bdb5737d4c07dc80fd3f32111b8d Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Mon, 30 Oct 2023 14:57:09 +0000 Subject: [PATCH 2/5] Case sensitivity --- Makefile | 2 +- sources/config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 682cf09..d8a3bb6 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -SOURCES=sources/TASSh.glyphs +SOURCES=sources/TasSh.glyphs FAMILY=TAS School Hand DRAWBOT_SCRIPTS=$(shell ls documentation/*.py) DRAWBOT_OUTPUT=$(shell ls documentation/*.py | sed 's/\.py/.png/g') diff --git a/sources/config.yaml b/sources/config.yaml index bb21c65..7880c93 100644 --- a/sources/config.yaml +++ b/sources/config.yaml @@ -1,6 +1,6 @@ recipeProvider: fontprimer sources: -- TASSh.glyphs +- TasSh.glyphs shortFamilyName: TAS variants: - name: Precursive From f4bd184462f9914aed668f347c6f8b8aadc08b6a Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Mon, 30 Oct 2023 15:41:57 +0000 Subject: [PATCH 3/5] Update python --- .github/workflows/build.yaml | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 078d635..6585743 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,6 +11,8 @@ jobs: uses: actions/setup-python@v2 with: python-version: "3.10" + - name: Set up latest harfbuzz + uses: notofonts/install-harfbuzz-action@main - name: Install sys tools/deps run: | sudo apt-get update @@ -22,15 +24,6 @@ jobs: key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }} restore-keys: | ${{ runner.os }}-venv- - - name: Do first-run script if necessary - run: make .init.stamp - if: github.repository != 'googlefonts/googlefonts-project-template' - - uses: stefanzweifel/git-auto-commit-action@v4 - name: First-run setup - if: github.repository != 'googlefonts/googlefonts-project-template' - with: - file_pattern: .init.stamp README.md requirements.txt OFL.txt - commit_message: "Personalize for this repo" - name: gen zip file name id: zip-name shell: bash @@ -53,16 +46,16 @@ jobs: - name: Check with fontbakery run: make test continue-on-error: true - - name: proof - run: make proof - - name: setup site - run: cp scripts/index.html out/index.html - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - if: ${{ github.ref == 'refs/heads/main' }} - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./out + # - name: proof + # run: make proof + # - name: setup site + # run: cp scripts/index.html out/index.html + # - name: Deploy + # uses: peaceiris/actions-gh-pages@v3 + # if: ${{ github.ref == 'refs/heads/main' }} + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # publish_dir: ./out - name: Archive artifacts uses: actions/upload-artifact@v2 with: From 2999fcf04915ba4d56055fd7496b3058f4deb6b0 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Tue, 31 Oct 2023 09:01:57 +0000 Subject: [PATCH 4/5] Use bleed babelfont --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 89e58c4..458a6be 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ fontmake>=2.4 fontbakery>=0.8.11 gftools @ git+https://github.com/googlefonts/gftools@builder2 fontprimer @ git+https://github.com/simoncozens/fontprimer +babelfont @ git+https://github.com/simoncozens/babelfont gftools[qa]>=0.9.23 drawbot-skia>=0.4.8 sh>=1.14.2 From 1ae65358af1c5875c51520b9f01056b736f69fef Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Tue, 20 Feb 2024 06:55:48 +0000 Subject: [PATCH 5/5] No babelfont, rebuild --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 458a6be..89e58c4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,6 @@ fontmake>=2.4 fontbakery>=0.8.11 gftools @ git+https://github.com/googlefonts/gftools@builder2 fontprimer @ git+https://github.com/simoncozens/fontprimer -babelfont @ git+https://github.com/simoncozens/babelfont gftools[qa]>=0.9.23 drawbot-skia>=0.4.8 sh>=1.14.2