Skip to content

Commit

Permalink
Merge branch 'feature/241127-merge-latest-source-fonts' into 'main'
Browse files Browse the repository at this point in the history
feat: merge with latest sources

See merge request design/ux-engineers/inter-font-extensions!2
  • Loading branch information
Cuong Nguyen Vu committed Nov 27, 2024
2 parents d015179 + 8b6f6f6 commit 79980a7
Show file tree
Hide file tree
Showing 2,617 changed files with 530,949 additions and 41 deletions.
133 changes: 133 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Build font and specimen

on:
push:
branches: [main]
release:
types: [published]

jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install sys tools/deps
run: |
sudo apt-get update
sudo apt-get install ttfautohint
sudo snap install yq
- uses: actions/cache@v4
with:
path: ./venv/
key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-venv-
- name: gen zip file name
id: zip-name
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

- name: Bump release (.glyphspackage)
if: ${{ github.event_name == 'release' }}
run: |
. venv/bin/activate
TAG_NAME=${GITHUB_REF/refs\/tags\//}
echo "Bumping version to $TAG_NAME"
python scripts/bumpfontversion.py --new-version $TAG_NAME sources/**/Inter*.glyphspackage
- name: Build all fonts
if: ${{ github.event_name == 'release' }}
run: make build
- name: Build only variable
if: ${{ github.event_name != 'release' }}
run: make build-only-var
- 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@v4
# if: ${{ github.ref == 'refs/heads/main' }}
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./out
- name: Archive artifacts
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:
name: Create and populate release
permissions:
contents: write
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@v4
- name: Download font artefact files
uses: actions/download-artifact@v4
with:
name: ${{ env.ZIP_NAME }}
path: ${{ env.ZIP_NAME }}
- 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
50 changes: 49 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,50 @@
.vscode
*~
venv
venv-test
build.stamp
build-only-var.stamp
proof
fonts
node_modules
package-lock.json
package.json
master_ufo
instance_ufos
.ninja_log
build.ninja
sources/build-*.ninja
inter
tmp

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# OS generated files #
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Autosaved by application when editing
*(تم الحفظ تلقائيًا).*
*(automaticky uloženo).*
*(Automatisch gesichert).*
*(Autosaved).*
*(guardado automáticamente).*
*(enregistré automatiquement).*
*(salvato automaticamente).*
*(自動保存).*
*(자동 저장됨).*
*(Salvo Automaticamente).*
*(Автосохранение).*
*(Otomatik Kaydedildi).*
*(自动存储).*
*(已自動儲存).*

# IDE
.vscode
3 changes: 3 additions & 0 deletions .templaterc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"files": [".github/**/*", "Makefile", "scripts/**/*", "requirements.txt"]
}
11 changes: 11 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This is the official list of project authors for copyright purposes.
# This file is distinct from the CONTRIBUTORS.txt file.
# See the latter for an explanation.
#
# Names should be added to this file as:
# Name or Organization <email address>

Rasmus Andersson <[email protected]>
Anagata Design <[email protected]>
Cadson Demak <[email protected]>
Grab Holdings Limited
44 changes: 44 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Project Building

This project relies on the Makefile and GitHub Actions to build, test, and release the font files. It uses the [googlefonts-project-template](https://github.com/googlefonts/googlefonts-project-template), which implements industry best practices through fonttools, fontmake, and other essential packages for binary font production.

## Building

Fonts are built automatically by GitHub Actions - take a look in the "Actions" tab for the latest build.

If you want to build fonts manually on your own computer:

* `make build` will produce all font files.
* `make build-only-var` will produce only variable font files.
* `make test` will run [FontBakery](https://github.com/googlefonts/fontbakery)'s quality assurance tests.
* `make proof` will generate HTML proof files.

## Directories

### `features/`

Contains Inter's feature files required for building. Note that when UFO files are merged, the `include` statements are relative to the outer directory.

### `recipeproviders/`

Houses a custom recipe configuration for building all font sources with `gftools builder`.

### `glyphsets/`

Contains a modified `GF_Latin_Core` set with additional glyphs for building:

- `tcedilla`
- `drthook`
- `uni021A`
- `commabelowcmb`
- `acutedblcomb`
- `uni012F.ccmp`

### `scripts/`

Collection of Python utilities to assist the building process:

* `bumpfontversion.py` – A small derived version of Simon's [bumpfontversion](https://github.com/simoncozens/bumpfontversion) for .glyphspackage.
* `config-for-vf.py` – Temporarily create yaml configs for `build-only-var` build target.
* `fix_encoding.py` – Remap the encoding for some glyphs to match the latest Inter's sources.
* `process-merge.py` – Process the merging each script and Inter's Latin sources.
15 changes: 15 additions & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This is the list of people who have contributed to this project,
# and includes those not listed in AUTHORS.txt because they are not
# copyright authors. For example, company employees may be listed
# here because their company holds the copyright and is listed there.
#
# When adding J Random Contributor's name to this file, either J's
# name or J's organization's name should be added to AUTHORS.txt
#
# Names should be added to this file as:
# Name <email address>

Sovichet Tep <[email protected]>
Longdey Hak <[email protected]>
Suppakit Chalermlarp <[email protected]>
Knaz Uiyamathiti <[email protected]>
Loading

0 comments on commit 79980a7

Please sign in to comment.