Skip to content

Commit

Permalink
Fix description, OFLs, build
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Mar 19, 2024
1 parent 17bf6fe commit 041967f
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 85 deletions.
120 changes: 72 additions & 48 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -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') }}
Expand All @@ -29,66 +30,89 @@ 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: |
fonts
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
12 changes: 0 additions & 12 deletions DESCRIPTION.en_us.html

This file was deleted.

23 changes: 7 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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')

Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion OFL.txt
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
9 changes: 9 additions & 0 deletions documentation/DESCRIPTION.en_us.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<p>
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.
</p>
<p>
This font represents the forms used in Queensland.
</p>
<p>
To contribute, see <a href="https://github.com/SorkinType/VICWANTSchoolHandAustralia">github.com/SorkinType/VICWANTSchoolHandAustralia</a>.
</p>
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions sources/AuQldHand.glyphs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)";
}
);
},
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions sources/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -31,5 +32,5 @@ variants:
- operation: featureFreeze
args: -f ss06
doGuidelines: true
buildStatic: true
buildStatic: false
buildColorVariable: true

0 comments on commit 041967f

Please sign in to comment.