Skip to content

Commit

Permalink
Merge pull request #3 from simoncozens/main
Browse files Browse the repository at this point in the history
Move to new build system
  • Loading branch information
EbenSorkin committed Oct 30, 2023
2 parents d2b7f4b + b20d46e commit 51e0824
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 159 deletions.
35 changes: 14 additions & 21 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.8
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
Expand All @@ -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
Expand All @@ -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:
Expand Down
16 changes: 7 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SOURCES=$(shell python3 scripts/read-config.py --sources )
FAMILY=$(shell python3 scripts/read-config.py --family )
SOURCES=sources/BriemHand.glyphs
FAMILY=Briem Hand
DRAWBOT_SCRIPTS=$(shell ls documentation/*.py)
DRAWBOT_OUTPUT=$(shell ls documentation/*.py | sed 's/\.py/.png/g')

Expand All @@ -18,19 +18,17 @@ build: build.stamp

venv: venv/touchfile

build.stamp: venv .init.stamp sources/config.yaml $(SOURCES)
. venv/bin/activate; rm -rf fonts/; gftools builder sources/config.yaml && touch build.stamp

.init.stamp: venv
. venv/bin/activate; python3 scripts/first-run.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

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
Expand All @@ -43,7 +41,7 @@ images: venv build.stamp $(DRAWBOT_OUTPUT)

clean:
rm -rf venv
find . -name "*.pyc" | xargs rm delete
find . -name "*.pyc" -delete

update-project-template:
npx update-template https://github.com/googlefonts/googlefonts-project-template/
Expand Down
13 changes: 13 additions & 0 deletions fontbakery.yml
Original file line number Diff line number Diff line change
@@ -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
135 changes: 10 additions & 125 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,125 +1,10 @@
absl-py==1.4.0
appdirs==1.4.4
async-generator==1.10
attrs==23.1.0
axisregistry==0.4.3
babelfont==3.0.1
beautifulsoup4==4.12.2
beziers==0.5.0
blackrenderer==0.6.0
booleanOperations==0.9.0
Brotli==1.0.9
bump2version==1.0.1
bumpfontversion==0.4.1
cattrs==23.1.2
certifi==2023.5.7
cffi==1.15.1
cffsubr==0.2.9.post1
charset-normalizer==3.1.0
click==8.1.3
cmarkgfm==2022.10.27
collidoscope==0.6.5
colorlog==6.7.0
commandlines==0.4.1
compreffor==0.5.3
cryptography==41.0.1
cu2qu==1.6.7.post2
defcon==0.10.2
dehinter==4.0.0
Deprecated==1.2.14
diffenator2==0.2.5
drawbot-skia==0.5.0
exceptiongroup==1.1.1
font-v==2.1.0
fontbakery==0.8.13
fontFeatures==1.7.4
fontmake==3.6.0
fontMath==0.9.3
fonttools==4.40.0
freetype-py==2.4.0
fs==2.4.16
gflanguages==0.8.9
gftools==0.9.32
gitdb==4.0.10
GitPython==3.1.31
glyphsets==0.6.2
glyphsLib==6.2.2
glyphtools==0.8.0
h11==0.14.0
hyperglot==0.4.5
idna==3.4
importlib-resources==5.12.0
Jinja2==3.1.2
kurbopy==0.9.0
lxml==4.9.2
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.24.3
openstep-plist==0.3.0.post1
opentype-sanitizer==9.1.0
opentypespec==1.9.1
orjson==3.9.1
outcome==1.2.0
packaging==23.1
picosvg==0.22.0
Pillow==9.5.0
pip-api==0.0.30
pngquant-cli==2.17.0.post5
protobuf==3.20.3
pyahocorasick==2.0.0
pybind11==2.10.4
pyclipper==1.3.0.post4
pycparser==2.21
pygit2==1.12.1
PyGithub==1.59.0
Pygments==2.15.1
PyJWT==2.7.0
PyNaCl==1.5.0
pyparsing==3.1.0
PySocks==1.7.1
python-bidi==0.4.2
python-dateutil==2.8.2
PyYAML==6.0
regex==2023.6.3
requests==2.31.0
resvg-cli==0.22.0.post3
rich==13.4.2
rstr==3.2.1
selenium==4.10.0
sh==2.0.4
six==1.16.0
skia-pathops==0.8.0
skia-python==87.5
smmap==5.0.0
sniffio==1.3.0
sortedcontainers==2.4.0
soupsieve==2.4.1
sre-yield==1.2
statmake==0.6.0
strictyaml==1.7.3
stringbrewer==0.0.1
tabulate==0.9.0
toml==0.10.2
tqdm==4.65.0
trio==0.22.0
trio-websocket==0.10.3
ttfautohint-py==0.5.1
typing_extensions==4.6.3
ufo2ft==2.32.0
ufoLib2==0.14.0
ufolint==1.2.0
uharfbuzz==0.37.0
unicodedata2==15.0.0
Unidecode==1.3.6
urllib3==2.0.3
vharfbuzz==0.2.0
vttLib==0.12.0
wrapt==1.15.0
wsproto==1.2.0
youseedee==0.3.0
zipp==3.15.0
zopfli==0.2.2
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
10 changes: 6 additions & 4 deletions sources/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
recipeProvider: fontprimer

Check warning on line 1 in sources/config.yaml

View workflow job for this annotation

GitHub Actions / build

Fontbakery failures

The fontbakery QA check reported errors in your font. Please check the generated report.
sources:
- BriemHand.glyphs
axisOrder:
- wght
familyName: Briem Hand
- BriemHand.glyphs
shortFamilyName: Briem
doGuidelines: true
buildStatic: true
buildColorVariable: true

0 comments on commit 51e0824

Please sign in to comment.