Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
EbenSorkin authored Sep 29, 2023
0 parents commit d4cbaad
Show file tree
Hide file tree
Showing 20 changed files with 178,405 additions and 0 deletions.
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.10
uses: actions/setup-python@v2
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@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"
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +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
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"]
}
7 changes: 7 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 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>

10 changes: 10 additions & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 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>
12 changes: 12 additions & 0 deletions DESCRIPTION.en_us.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<p>
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 &amp; etc.)
If unsure, use https://www.freeformatter.com/html-escape.html for formatting. (Use "Escape HTML").
</p>
<p>
Could be several paragraphs, also.
</p>
<p>
To contribute, see <a href="https://github.com/youruseraccount/yourrepository">github.com/youruseraccount/yourrepository</a>.
</p>
53 changes: 53 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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)
rm -rf fonts
(for config in sources/config*.yaml; do . venv/bin/activate; gftools builder $$config; done) && 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" -delete

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

update:
pip install --upgrade $(dependency); pip freeze > requirements.txt
93 changes: 93 additions & 0 deletions OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 20** The My Font Project Authors (https://github.com/googlefonts/googlefonts-project-template)

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:
https://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Loading

0 comments on commit d4cbaad

Please sign in to comment.