From 041967fa2c2c06b4e97d0ba82a9541da0e300401 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Tue, 19 Mar 2024 13:49:50 +0000 Subject: [PATCH] Fix description, OFLs, build --- .github/workflows/build.yaml | 120 ++++++++++++++++----------- DESCRIPTION.en_us.html | 12 --- Makefile | 23 ++--- OFL.txt | 2 +- documentation/DESCRIPTION.en_us.html | 9 ++ requirements.txt | 2 +- sources/AuQldHand.glyphs | 10 +-- sources/config.yaml | 5 +- 8 files changed, 98 insertions(+), 85 deletions(-) delete mode 100644 DESCRIPTION.en_us.html create mode 100644 documentation/DESCRIPTION.en_us.html diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6585743..cac1843 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,24 +1,25 @@ name: Build font and specimen -on: [push, release] +on: push jobs: build: + name: Build and test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 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 sudo apt-get install ttfautohint sudo snap install yq - - uses: actions/cache@v2 + - name: Set up latest harfbuzz + uses: notofonts/install-harfbuzz-action@main + - uses: actions/cache@v4 with: path: ./venv/ key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }} @@ -29,35 +30,37 @@ jobs: shell: bash # Set the archive name to repo name + "-assets" e.g "MavenPro-assets" run: echo "ZIP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-fonts" >> $GITHUB_ENV - # If a new release is cut, use the release tag to auto-bump the source files - - name: Bump release - if: github.event_name == 'release' - run: | - . venv/bin/activate - SRCS=$(yq e ".sources[]" sources/config.yaml) - TAG_NAME=${GITHUB_REF/refs\/tags\//} - echo "Bumping $SRCS to $TAG_NAME" - for src in $SRCS - do - bumpfontversion sources/$src --new-version $TAG_NAME; - done + + # If a new release is cut, use the release tag to auto-bump the source files + # - name: Bump release + # if: github.event_name == 'release' + # run: | + # . venv/bin/activate + # SRCS=$(yq e ".sources[]" sources/config.yaml) + # TAG_NAME=${GITHUB_REF/refs\/tags\//} + # echo "Bumping $SRCS to $TAG_NAME" + # for src in $SRCS + # do + # bumpfontversion sources/$src --new-version $TAG_NAME; + # done + - name: Build font run: make build - 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 + uses: actions/upload-artifact@v4 with: name: ${{ env.ZIP_NAME }} path: | @@ -65,30 +68,51 @@ jobs: out outputs: zip_name: ${{ env.ZIP_NAME }} + + # There are two ways a release can be created: either by pushing a tag, or by + # creating a release from the GitHub UI. Pushing a tag does not automatically + # create a release, so we have to do that ourselves. However, creating a + # release from the GitHub UI *does* push a tag, and we don't want to create + # a new release in that case because one already exists! + release: - # only run if the commit is tagged... - if: github.event_name == 'release' - # ... and it builds successfully - needs: - - build + name: Create and populate release + needs: build runs-on: ubuntu-latest + if: contains(github.ref, 'refs/tags/') env: ZIP_NAME: ${{ needs.build.outputs.zip_name }} + GH_TOKEN: ${{ github.token }} steps: - - uses: actions/checkout@v2 - - name: Download artefact files - uses: actions/download-artifact@v2 + - uses: actions/checkout@v4 + - name: Download font artefact files + uses: actions/download-artifact@v4 with: name: ${{ env.ZIP_NAME }} path: ${{ env.ZIP_NAME }} - - name: Zip files - run: zip -r ${{ env.ZIP_NAME }}.zip ${{ env.ZIP_NAME }} - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ env.ZIP_NAME }}.zip - asset_name: ${{ env.ZIP_NAME }}.zip - tag: ${{ github.ref }} - overwrite: true - body: "Production ready fonts" + - name: Copy DESCRIPTION.en_us.html to artefact directory + run: cp documentation/DESCRIPTION.en_us.html ${{ env.ZIP_NAME }}/DESCRIPTION.en_us.html + - name: Copy ARTICLE.en_us.html to artefact directory + run: cp documentation/ARTICLE.en_us.html ${{ env.ZIP_NAME }}/ARTICLE.en_us.html + continue-on-error: true + - name: Copy OFL.txt to artefact directory + run: cp OFL.txt ${{ env.ZIP_NAME }}/OFL.txt + - name: Remove proof/fontbakery stuff from release + run: rm -rf ${{ env.ZIP_NAME }}/out + - name: gen release file name + shell: bash + run: echo "RELEASE_ZIP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-${{github.ref_name}}" >> $GITHUB_ENV + - name: Create release bundle + run: mv ${{ env.ZIP_NAME }} ${{ env.RELEASE_ZIP_NAME }}; zip -r ${{ env.RELEASE_ZIP_NAME }}.zip ${{ env.RELEASE_ZIP_NAME }} + - name: Check for release + id: create_release + run: | + if ! gh release view ${{ github.ref_name }}; then + git show -s --format=%B ${{ github.ref_name }} | tail -n +4 | gh release create ${{ github.ref_name }} -t ${{ github.ref_name }} -F - + fi + - name: Populate release + run: | + gh release upload ${{ github.ref_name }} ${{ env.RELEASE_ZIP_NAME }}.zip --clobber + - name: Set release live + run: | + gh release edit ${{ github.ref_name }} --draft=false diff --git a/DESCRIPTION.en_us.html b/DESCRIPTION.en_us.html deleted file mode 100644 index 34a7b19..0000000 --- a/DESCRIPTION.en_us.html +++ /dev/null @@ -1,12 +0,0 @@ -

- Please add a text describing the font here, 100 chracters or more, but no more than 500 words. - See https://googlefonts.github.io/gf-guide/description.html for further reference. - Please make sure that HTML characters are properly encoded. ('&' becomes & etc.) - If unsure, use https://www.freeformatter.com/html-escape.html for formatting. (Use "Escape HTML"). -

-

- Could be several paragraphs, also. -

-

- To contribute, see github.com/youruseraccount/yourrepository. -

\ No newline at end of file diff --git a/Makefile b/Makefile index c9ea90d..b4d0685 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -SOURCES=sources/QLDSchoolHand.glyphs -FAMILY=QLD School Hand +SOURCES=sources/AuVICWANT.glyphs +FAMILY=Edu VIC WA NT Hand DRAWBOT_SCRIPTS=$(shell ls documentation/*.py) DRAWBOT_OUTPUT=$(shell ls documentation/*.py | sed 's/\.py/.png/g') @@ -18,11 +18,6 @@ build: build.stamp venv: venv/touchfile -venv-test: venv-test/touchfile - -customize: venv - . venv/bin/activate; python3 scripts/customize.py - 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 @@ -32,21 +27,17 @@ venv/touchfile: requirements.txt . venv/bin/activate; pip install -Ur requirements.txt touch venv/touchfile -venv-test/touchfile: requirements-test.txt - test -d venv-test || python3 -m venv venv-test - . venv-test/bin/activate; pip install -Ur requirements-test.txt - touch venv-test/touchfile - -test: venv-test build.stamp - . venv-test/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.' +test: venv build.stamp + . 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 -images: venv $(DRAWBOT_OUTPUT) +images: venv build.stamp $(DRAWBOT_OUTPUT) + git add documentation/*.png && git commit -m "Rebuild images" documentation/*.png %.png: %.py build.stamp - . venv/bin/activate; python3 $< --output $@ + python3 $< --output $@ clean: rm -rf venv diff --git a/OFL.txt b/OFL.txt index 3785d9f..34370d3 100644 --- a/OFL.txt +++ b/OFL.txt @@ -1,4 +1,4 @@ -Copyright 2023 The Au-Primary-School-Fonts Project Authors (https://github.com/googlefonts/googlefonts-project-template) +Copyright 2023 The QLD School Hand Australia Project Authors (https://github.com/SorkinType/QLDSchoolhandAustralia) This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: diff --git a/documentation/DESCRIPTION.en_us.html b/documentation/DESCRIPTION.en_us.html new file mode 100644 index 0000000..0d1367d --- /dev/null +++ b/documentation/DESCRIPTION.en_us.html @@ -0,0 +1,9 @@ +

+ The AU School Handwriting Fonts are an English language, OpenType, variable typeface family designed specifically to meet Australian Education standards. While weights, widths and optical sizes were carefully crafted to work well in an Australian classroom environment, they are just as comfortable to read and work with in the home environment. +

+

+ This font represents the forms used in Queensland. +

+

+ To contribute, see github.com/SorkinType/VICWANTSchoolHandAustralia. +

diff --git a/requirements.txt b/requirements.txt index 89e58c4..76749a0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ fontmake>=2.4 fontbakery>=0.8.11 -gftools @ git+https://github.com/googlefonts/gftools@builder2 +gftools @ git+https://github.com/googlefonts/gftools@main fontprimer @ git+https://github.com/simoncozens/fontprimer gftools[qa]>=0.9.23 drawbot-skia>=0.4.8 diff --git a/sources/AuQldHand.glyphs b/sources/AuQldHand.glyphs index 5bc90b2..f8f35fc 100644 --- a/sources/AuQldHand.glyphs +++ b/sources/AuQldHand.glyphs @@ -544,8 +544,8 @@ name = "Variable Font Origin"; value = m01; } ); -date = "2024-03-08 05:37:32 +0000"; -familyName = AuQldHand; +date = "2023-10-02 15:09:53 +0000"; +familyName = "Edu QLD Hand"; featurePrefixes = ( { automatic = 1; @@ -371096,7 +371096,7 @@ key = copyrights; values = ( { language = dflt; -value = "Copyright 2022 The AU School Handwriting Fonts Project Authors (https://github.com/MezMerrit/AU-School-Handwriting-Fonts)"; +value = "Copyright 2023 The QLD School Hand Australia Project Authors (https://github.com/SorkinType/QLDSchoolhandAustralia)"; } ); }, @@ -371127,13 +371127,13 @@ key = licenses; values = ( { language = dflt; -value = "This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://scripts.sil.org/OFL"; +value = "This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://openfontlicense.org"; } ); }, { key = licenseURL; -value = "https://scripts.sil.org/OFL"; +value = "https://openfontlicense.org/"; }, { key = manufacturers; diff --git a/sources/config.yaml b/sources/config.yaml index b018c90..ddeff73 100644 --- a/sources/config.yaml +++ b/sources/config.yaml @@ -2,7 +2,8 @@ recipeProvider: fontprimer includeSourceFixes: false sources: - QLDSchoolHand.glyphs -shortFamilyName: QLD +familyName: Edu QLD Hand +shortFamilyName: Edu QLD variants: - name: Precursive alias: Pre @@ -31,5 +32,5 @@ variants: - operation: featureFreeze args: -f ss06 doGuidelines: true -buildStatic: true +buildStatic: false buildColorVariable: true