Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix font technical and repository #36

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Build font and specimen

on: [push, release]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install sys tools/deps
run: |
sudo apt-get update
sudo apt-get install ttfautohint
sudo snap install yq
- uses: actions/cache@v2
with:
path: ./venv/
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
# 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: 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: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.ZIP_NAME }}
path: |
fonts
out
outputs:
zip_name: ${{ env.ZIP_NAME }}
release:
# only run if the commit is tagged...
if: github.event_name == 'release'
# ... and it builds successfully
needs:
- build
runs-on: ubuntu-latest
env:
ZIP_NAME: ${{ needs.build.outputs.zip_name }}
steps:
- uses: actions/checkout@v2
- name: Download artefact files
uses: actions/download-artifact@v2
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"
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
*~
venv
build.stamp
proof
fonts
node_modules
package-lock.json
package.json
master_ufo
instance_ufo

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
Empty file added .init.stamp
Empty file.
3 changes: 2 additions & 1 deletion CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
# name or J's organization's name should be added to AUTHORS.txt
#
# Names should be added to this file as:
# Gumpita Rahayu <[email protected]>
# Gumpita Rahayu <[email protected]>
Taufik Oktama <[email protected]>
52 changes: 52 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
SOURCES=$(shell python3 scripts/read-config.py --sources )
FAMILY=$(shell python3 scripts/read-config.py --family )
DRAWBOT_SCRIPTS=$(shell ls documentation/*.py)
DRAWBOT_OUTPUT=$(shell ls documentation/*.py | sed 's/\.py/.png/g')

help:
@echo "###"
@echo "# Build targets for $(FAMILY)"
@echo "###"
@echo
@echo " make build: Builds the fonts and places them in the fonts/ directory"
@echo " make test: Tests the fonts with fontbakery"
@echo " make proof: Creates HTML proof documents in the proof/ directory"
@echo " make images: Creates PNG specimen images in the documentation/ directory"
@echo

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

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.'

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 build.stamp $(DRAWBOT_OUTPUT)
git add documentation/*.png && git commit -m "Rebuild images" documentation/*.png

%.png: %.py build.stamp
python3 $< --output $@

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

update-project-template:
npx update-template https://github.com/googlefonts/googlefonts-project-template/

update:
pip install --upgrade $(dependency); pip freeze > requirements.txt
56 changes: 36 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# Plus Jakarta Sans

![/documentation/img/plusjakartasans.png](/documentation/img/plusjakartasans.png)
[![][Fontbakery]](https://ottta.github.io/PlusJakartaSans.git/fontbakery/fontbakery-report.html)
[![][Universal]](https://ottta.github.io/PlusJakartaSans.git/fontbakery/fontbakery-report.html)
[![][GF Profile]](https://ottta.github.io/PlusJakartaSans.git/fontbakery/fontbakery-report.html)
[![][Outline Correctness]](https://ottta.github.io/PlusJakartaSans.git/fontbakery/fontbakery-report.html)
[![][Shaping]](https://ottta.github.io/PlusJakartaSans.git/fontbakery/fontbakery-report.html)

![/documentation/img/plusjakartasans-alt.gif](/documentation/img/plusjakartasans-alt.gif)
[Fontbakery]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fottta%2FPlusJakartaSans.git%2Fgh-pages%2Fbadges%2Foverall.json
[GF Profile]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fottta%2FPlusJakartaSans.git%2Fgh-pages%2Fbadges%2FGoogleFonts.json
[Outline Correctness]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fottta%2FPlusJakartaSans.git%2Fgh-pages%2Fbadges%2FOutlineCorrectnessChecks.json
[Shaping]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fottta%2FPlusJakartaSans.git%2Fgh-pages%2Fbadges%2FShapingChecks.json
[Universal]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fottta%2FPlusJakartaSans.git%2Fgh-pages%2Fbadges%2FUniversal.json

## About Plus Jakarta Sans Project
## About

Plus Jakarta Sans is a font family that takes geometric sans serif styles, designed by Gumpita Rahayu from Tokotype, the fonts were originally commissioned by 6616 Studio for Jakarta Provincial Government program's +Jakarta City of Collaboration identity in 2020.

Expand All @@ -16,15 +24,31 @@ As part of Plus Jakarta as a city of collaboration, fonts are made available for

To contribute to the project, Please see <a href="https://github.com/tokotype/PlusJakartaSans">github.com/tokotype/PlusJakartaSans</a> or visit http://www.tokotype.com

## Build
![/documentation/img/plusjakartasans.png](/documentation/img/plusjakartasans.png)

![/documentation/img/plusjakartasans-alt.gif](/documentation/img/plusjakartasans-alt.gif)

## 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:

Build the fonts with `gftools builder sources/builder.yaml` from the repository’s root folder
* `make build` will produce font files.
* `make test` will run [FontBakery](https://github.com/googlefonts/fontbakery)'s quality assurance tests.
* `make proof` will generate HTML proof files.

## Test
The proof files and QA tests are also available automatically via GitHub Actions - look at https://ottta.github.io/PlusJakartaSans.git.

Test the fonts with `fontbakery check-googlefonts fonts/variable/*.ttf` and `fontbakery check-googlefonts fonts/ttf/*.ttf` from the repository’s root folder
## Changelog

## FONTLOG for Plus Jakarta Sans fonts
### **20 May 2023 (Taufik Oktama) Plus Jakarta Sans v2.107
- Update font repository to [googlefonts-project-template](https://github.com/googlefonts/googlefonts-project-template)
- Fix inconsistent vertical metrics and make sure all glyphs will not be clipping
- Increase significant version number 2.007 > 2.107
- Write Display String in font info glyphsapp to `false`
- Fix all http to https due to fontbakery warning
- Restructure this README.md

### 19 May 2023 (Gumpita Rahayu) Plus Jakarta Sans v2.700

Expand Down Expand Up @@ -65,18 +89,6 @@ Test the fonts with `fontbakery check-googlefonts fonts/variable/*.ttf` and `fon

![/documentation/img/plusjakartasans.gif](/documentation/img/plusjakartasans.gif)


### [↓ Download the latest release ↓](https://github.com/tokotype/plusjakartasans/releases/latest)

After downloading the zip from above:

- Double-click the downloaded zip file to unpack or open it.
- Mac OSX: Use FontBook Software (Default App on Mac). Select the fonts files you want to install and drag the fonts into your library or you can find Macintosh HD/Library/Fonts and copy the font files to the directory.
- Windows: Select all fonts you want to install and pop-up of the fonts file will show, click install and done. Or Go to Start > Control Panel > Fonts, then locate fonts file and click install.

## Authors
[Gumpita Rahayu - Tokotype](https://www.tokotype.com)

## Contribution

If you want to contribute to develop improvements of this font family, you can fork this project and create an issue or email us at [email protected]
Expand All @@ -85,3 +97,7 @@ If you want to contribute to develop improvements of this font family, you can f
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:
http://scripts.sil.org/OFL

## Repository Layout

This font repository structure is inspired by [Unified Font Repository v0.3](https://github.com/unified-font-repository/Unified-Font-Repository), modified for the Google Fonts workflow.
Loading