generated from notofonts/noto-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0012f9f
Showing
37 changed files
with
2,494 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Build, QA, Release | ||
|
||
on: push | ||
|
||
jobs: | ||
build_font: | ||
uses: notofonts/notobuilder/.github/workflows/build.yaml@main | ||
secrets: inherit | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
*~ | ||
venv | ||
build.stamp | ||
proof | ||
fonts | ||
node_modules | ||
package-lock.json | ||
package.json | ||
|
||
# OS generated files # | ||
###################### | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"files": [".github/**/*", "Makefile", "scripts/**/*", "requirements.txt"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
SOURCES=$(shell python3 scripts/read-config.py --sources ) | ||
FAMILY=$(shell python3 scripts/read-config.py --family ) | ||
|
||
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; python3 -m notobuilder $$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; python3 -m notoqa | ||
|
||
proof: venv build.stamp | ||
. venv/bin/activate; mkdir -p out/ out/proof; gftools gen-html proof $(shell find fonts/*/unhinted/ttf -type f) -o out/proof | ||
|
||
%.png: %.py build.stamp | ||
python3 $< --output $@ | ||
|
||
clean: | ||
rm -rf venv | ||
find . -name "*.pyc" | xargs rm delete | ||
|
||
update-ufr: | ||
npx update-template https://github.com/notofonts/noto-project-template/ | ||
|
||
update: | ||
pip install --upgrade $(dependency) | ||
|
||
manual_release: build.stamp | ||
@echo "Creating release files manually is contraindicated." | ||
@echo "Please use the CI for releases instead." | ||
cd fonts; for family in *; do VERSION=`font-v report $$family/unhinted/ttf/* | grep Version | sort -u | awk '{print $$2}'`; zip -r ../$$family-v$$VERSION.zip $$family; done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
Copyright 20** The Noto Project Authors (https://github.com/notofonts/noto-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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Noto My Font | ||
|
||
[![][Fontbakery]](https://notofonts.github.io/noto-project-template/fontbakery/fontbakery-report.html) | ||
[![][Universal]](https://notofonts.github.io/noto-project-template/fontbakery/fontbakery-report.html) | ||
[![][GF Profile]](https://notofonts.github.io/noto-project-template/fontbakery/fontbakery-report.html) | ||
[![][Outline Correctness]](https://notofonts.github.io/noto-project-template/fontbakery/fontbakery-report.html) | ||
[![][Shaping]](https://notofonts.github.io/noto-project-template/fontbakery/fontbakery-report.html) | ||
|
||
[Fontbakery]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnotofonts%2Fnoto-project-template%2Fgh-pages%2Fbadges%2Foverall.json | ||
[GF Profile]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnotofonts%2Fnoto-project-template%2Fgh-pages%2Fbadges%2FGoogleFonts.json | ||
[Noto Profile]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnotofonts%2Fnoto-project-template%2Fgh-pages%2Fbadges%2FNotoFonts.json | ||
[Outline Correctness]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnotofonts%2Fnoto-project-template%2Fgh-pages%2Fbadges%2FOutlineCorrectnessChecks.json | ||
[Shaping]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnotofonts%2Fnoto-project-template%2Fgh-pages%2Fbadges%2FShapingChecks.json | ||
[Universal]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnotofonts%2Fnoto-project-template%2Fgh-pages%2Fbadges%2FUniversal.json | ||
|
||
## 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 font files. | ||
* `make test` will run [FontBakery](https://github.com/googlefonts/fontbakery)'s quality assurance tests. | ||
* `make proof` will generate HTML proof files. | ||
|
||
The proof files and QA tests are also available automatically via GitHub Actions - look at `https://yourname.github.io/your-font-repository-name`. | ||
|
||
For information on how to work on Noto fonts, how the build process | ||
works and how to maintain it, see [the README file of the | ||
notofonts.github.io | ||
repository](https://github.com/notofonts/notofonts.github.io/blob/main/README.md) | ||
|
||
## License | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
com.google.fonts/check/shaping: | ||
test_directory: qa/shaping_tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"tests": [ | ||
{ | ||
"input": "", | ||
"expectation": "uni0E70=0+1024" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
git+https://github.com/notofonts/notobuilder | ||
drawbot-skia>=0.4.8 | ||
sh>=1.14.2 | ||
bumpfontversion | ||
chevron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import os | ||
import sys | ||
from fontv.libfv import FontVersion | ||
from fontTools.ttLib import TTFont | ||
from glob import glob | ||
import yaml | ||
|
||
|
||
tag = sys.argv[1] | ||
try: | ||
family, version = tag.split("-v", 2) | ||
except Exception as e: | ||
print(f"::notice file=scripts/checktag.py::Tag '{tag}' had unknown format") | ||
print("::set-output name=result::skip") | ||
sys.exit(0) | ||
|
||
if not os.path.exists("fonts/" + family): | ||
print(f"::error file=scripts/checktag.py::Family '{family}' did not exist") | ||
sys.exit(1) | ||
|
||
a_font = glob(f"fonts/{family}/*/*/*Regular.ttf") + glob(f"fonts/{family}/*/*/*VF.ttf") | ||
if not a_font: | ||
print(f"::error file=scripts/checktag.py::No regular fonts found for family '{family}'") | ||
sys.exit(1) | ||
|
||
|
||
ttf_version = FontVersion(a_font[0]).version | ||
real_family_names = [ TTFont(x)["name"].getDebugName(1) for x in a_font ] | ||
|
||
# Identify the config file which created this | ||
found_config = None | ||
for config in glob("sources/*yaml"): | ||
this_config = yaml.load(open(config), Loader=yaml.FullLoader) | ||
if "familyName" in this_config and this_config["familyName"] in real_family_names: | ||
found_config = config | ||
break | ||
if not found_config: | ||
print(f"::error file=scripts/checktag.py::Could not identify config file for {family} (found a font of family {real_family_names})") | ||
sys.exit(1) | ||
|
||
if "Version "+version != ttf_version: | ||
print(f"::error file=scripts/checktag.py::Trying to create release for version {version}, found font version {ttf_version}") | ||
sys.exit(1) | ||
|
||
print("::set-output name=result::pass") | ||
print(f"::set-output name=family::{family}") | ||
print(f"::set-output name=config_file::{found_config}") | ||
sys.exit(0) |
Oops, something went wrong.