├── .init.stamp ├── .templaterc.json ├── documentation ├── SG.png ├── image1.png └── image1.py ├── fonts ├── otf │ ├── SpecialGothic-Bold.otf │ ├── SpecialGothic-Medium.otf │ ├── SpecialGothic-Regular.otf │ ├── SpecialGothic-SemiBold.otf │ ├── SpecialGothicExpanded-Bold.otf │ ├── SpecialGothicCondensed-Bold.otf │ ├── SpecialGothicCondensed-Medium.otf │ ├── SpecialGothicExpanded-Medium.otf │ ├── SpecialGothicExpanded-Regular.otf │ ├── SpecialGothicCondensed-Regular.otf │ ├── SpecialGothicCondensed-SemiBold.otf │ └── SpecialGothicExpanded-SemiBold.otf ├── ttf │ ├── SpecialGothic-Bold.ttf │ ├── SpecialGothic-Medium.ttf │ ├── SpecialGothic-Regular.ttf │ ├── SpecialGothic-SemiBold.ttf │ ├── SpecialGothicExpanded-Bold.ttf │ ├── SpecialGothicCondensed-Bold.ttf │ ├── SpecialGothicCondensed-Medium.ttf │ ├── SpecialGothicExpanded-Medium.ttf │ ├── SpecialGothicExpanded-Regular.ttf │ ├── SpecialGothicCondensed-Regular.ttf │ ├── SpecialGothicCondensed-SemiBold.ttf │ └── SpecialGothicExpanded-SemiBold.ttf ├── webfonts │ ├── SpecialGothic-Bold.woff2 │ ├── SpecialGothic-Medium.woff2 │ ├── SpecialGothic-Regular.woff2 │ ├── SpecialGothic-SemiBold.woff2 │ ├── SpecialGothic[wdth,wght].woff2 │ ├── SpecialGothicCondensed-Bold.woff2 │ ├── SpecialGothicExpanded-Bold.woff2 │ ├── SpecialGothicCondensed-Medium.woff2 │ ├── SpecialGothicExpanded-Medium.woff2 │ ├── SpecialGothicExpanded-Regular.woff2 │ ├── SpecialGothicCondensed-Regular.woff2 │ ├── SpecialGothicCondensed-SemiBold.woff2 │ └── SpecialGothicExpanded-SemiBold.woff2 └── variable │ └── SpecialGothic[wdth,wght].ttf ├── archives ├── config.yaml ├── fonts │ ├── specialgothic │ │ ├── otf │ │ │ └── SpecialGothic-Regular.otf │ │ ├── ttf │ │ │ └── SpecialGothic-Regular.ttf │ │ └── webfonts │ │ │ └── SpecialGothic-Regular.woff2 │ ├── specialgothic-expanded │ │ ├── otf │ │ │ └── SpecialGothicExpandedOne-Regular.otf │ │ ├── ttf │ │ │ └── SpecialGothicExpandedOne-Regular.ttf │ │ └── webfonts │ │ │ └── SpecialGothicExpandedOne-Regular.woff2 │ └── specialgothic-condensed │ │ ├── otf │ │ └── SpecialGothicCondensedOne-Regular.otf │ │ ├── ttf │ │ └── SpecialGothicCondensedOne-Regular.ttf │ │ └── webfonts │ │ └── SpecialGothicCondensedOne-Regular.woff2 ├── config-expanded.yaml ├── config-condensed.yaml └── build.sh ├── .gitignore ├── scripts ├── update-custom-filter.py ├── index.html ├── read-config.py └── first-run.py ├── AUTHORS.txt ├── DESCRIPTION.en_us.html ├── CONTRIBUTORS.txt ├── sources └── config.yaml ├── Makefile ├── requirements.txt ├── README.md ├── .github └── workflows │ └── build.yaml └── OFL.txt /.init.stamp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.templaterc.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [".github/**/*", "Makefile", "scripts/**/*", "requirements.txt"] 3 | } 4 | -------------------------------------------------------------------------------- /documentation/SG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/documentation/SG.png -------------------------------------------------------------------------------- /documentation/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/documentation/image1.png -------------------------------------------------------------------------------- /fonts/otf/SpecialGothic-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/otf/SpecialGothic-Bold.otf -------------------------------------------------------------------------------- /fonts/ttf/SpecialGothic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/ttf/SpecialGothic-Bold.ttf -------------------------------------------------------------------------------- /fonts/otf/SpecialGothic-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/otf/SpecialGothic-Medium.otf -------------------------------------------------------------------------------- /fonts/otf/SpecialGothic-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/otf/SpecialGothic-Regular.otf -------------------------------------------------------------------------------- /fonts/ttf/SpecialGothic-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/ttf/SpecialGothic-Medium.ttf -------------------------------------------------------------------------------- /fonts/ttf/SpecialGothic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/ttf/SpecialGothic-Regular.ttf -------------------------------------------------------------------------------- /fonts/otf/SpecialGothic-SemiBold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/otf/SpecialGothic-SemiBold.otf -------------------------------------------------------------------------------- /fonts/ttf/SpecialGothic-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/ttf/SpecialGothic-SemiBold.ttf -------------------------------------------------------------------------------- /archives/config.yaml: -------------------------------------------------------------------------------- 1 | sources: 2 | - SpecialGothic.glyphs 3 | familyName: "Special Gothic" 4 | outputDir: "../fonts/specialgothic" 5 | cleanUp: true -------------------------------------------------------------------------------- /fonts/otf/SpecialGothicExpanded-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/otf/SpecialGothicExpanded-Bold.otf -------------------------------------------------------------------------------- /fonts/ttf/SpecialGothicExpanded-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/ttf/SpecialGothicExpanded-Bold.ttf -------------------------------------------------------------------------------- /fonts/webfonts/SpecialGothic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/webfonts/SpecialGothic-Bold.woff2 -------------------------------------------------------------------------------- /fonts/otf/SpecialGothicCondensed-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/otf/SpecialGothicCondensed-Bold.otf -------------------------------------------------------------------------------- /fonts/otf/SpecialGothicCondensed-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/otf/SpecialGothicCondensed-Medium.otf -------------------------------------------------------------------------------- /fonts/otf/SpecialGothicExpanded-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/otf/SpecialGothicExpanded-Medium.otf -------------------------------------------------------------------------------- /fonts/otf/SpecialGothicExpanded-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/otf/SpecialGothicExpanded-Regular.otf -------------------------------------------------------------------------------- /fonts/ttf/SpecialGothicCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/ttf/SpecialGothicCondensed-Bold.ttf -------------------------------------------------------------------------------- /fonts/ttf/SpecialGothicCondensed-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/ttf/SpecialGothicCondensed-Medium.ttf -------------------------------------------------------------------------------- /fonts/ttf/SpecialGothicExpanded-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/ttf/SpecialGothicExpanded-Medium.ttf -------------------------------------------------------------------------------- /fonts/ttf/SpecialGothicExpanded-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/ttf/SpecialGothicExpanded-Regular.ttf -------------------------------------------------------------------------------- /fonts/variable/SpecialGothic[wdth,wght].ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/variable/SpecialGothic[wdth,wght].ttf -------------------------------------------------------------------------------- /fonts/webfonts/SpecialGothic-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/webfonts/SpecialGothic-Medium.woff2 -------------------------------------------------------------------------------- /fonts/webfonts/SpecialGothic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/webfonts/SpecialGothic-Regular.woff2 -------------------------------------------------------------------------------- /fonts/webfonts/SpecialGothic-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/webfonts/SpecialGothic-SemiBold.woff2 -------------------------------------------------------------------------------- /fonts/otf/SpecialGothicCondensed-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/otf/SpecialGothicCondensed-Regular.otf -------------------------------------------------------------------------------- /fonts/otf/SpecialGothicCondensed-SemiBold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/otf/SpecialGothicCondensed-SemiBold.otf -------------------------------------------------------------------------------- /fonts/otf/SpecialGothicExpanded-SemiBold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/otf/SpecialGothicExpanded-SemiBold.otf -------------------------------------------------------------------------------- /fonts/ttf/SpecialGothicCondensed-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/ttf/SpecialGothicCondensed-Regular.ttf -------------------------------------------------------------------------------- /fonts/ttf/SpecialGothicCondensed-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/ttf/SpecialGothicCondensed-SemiBold.ttf -------------------------------------------------------------------------------- /fonts/ttf/SpecialGothicExpanded-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/ttf/SpecialGothicExpanded-SemiBold.ttf -------------------------------------------------------------------------------- /fonts/webfonts/SpecialGothic[wdth,wght].woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/webfonts/SpecialGothic[wdth,wght].woff2 -------------------------------------------------------------------------------- /fonts/webfonts/SpecialGothicCondensed-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/webfonts/SpecialGothicCondensed-Bold.woff2 -------------------------------------------------------------------------------- /fonts/webfonts/SpecialGothicExpanded-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/webfonts/SpecialGothicExpanded-Bold.woff2 -------------------------------------------------------------------------------- /fonts/webfonts/SpecialGothicCondensed-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/webfonts/SpecialGothicCondensed-Medium.woff2 -------------------------------------------------------------------------------- /fonts/webfonts/SpecialGothicExpanded-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/webfonts/SpecialGothicExpanded-Medium.woff2 -------------------------------------------------------------------------------- /fonts/webfonts/SpecialGothicExpanded-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/webfonts/SpecialGothicExpanded-Regular.woff2 -------------------------------------------------------------------------------- /fonts/webfonts/SpecialGothicCondensed-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/webfonts/SpecialGothicCondensed-Regular.woff2 -------------------------------------------------------------------------------- /fonts/webfonts/SpecialGothicCondensed-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/webfonts/SpecialGothicCondensed-SemiBold.woff2 -------------------------------------------------------------------------------- /fonts/webfonts/SpecialGothicExpanded-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/fonts/webfonts/SpecialGothicExpanded-SemiBold.woff2 -------------------------------------------------------------------------------- /archives/fonts/specialgothic/otf/SpecialGothic-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/archives/fonts/specialgothic/otf/SpecialGothic-Regular.otf -------------------------------------------------------------------------------- /archives/fonts/specialgothic/ttf/SpecialGothic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/archives/fonts/specialgothic/ttf/SpecialGothic-Regular.ttf -------------------------------------------------------------------------------- /archives/config-expanded.yaml: -------------------------------------------------------------------------------- 1 | sources: 2 | - SpecialGothic-Expanded.glyphs 3 | familyName: "Special Gothic Expanded One" 4 | outputDir: "../fonts/specialgothic-expanded" 5 | cleanUp: true -------------------------------------------------------------------------------- /archives/config-condensed.yaml: -------------------------------------------------------------------------------- 1 | sources: 2 | - SpecialGothic-Condensed.glyphs 3 | familyName: "Special Gothic Condensed One" 4 | outputDir: "../fonts/specialgothic-condensed" 5 | cleanUp: true -------------------------------------------------------------------------------- /archives/fonts/specialgothic/webfonts/SpecialGothic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/archives/fonts/specialgothic/webfonts/SpecialGothic-Regular.woff2 -------------------------------------------------------------------------------- /archives/fonts/specialgothic-expanded/otf/SpecialGothicExpandedOne-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/archives/fonts/specialgothic-expanded/otf/SpecialGothicExpandedOne-Regular.otf -------------------------------------------------------------------------------- /archives/fonts/specialgothic-expanded/ttf/SpecialGothicExpandedOne-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/archives/fonts/specialgothic-expanded/ttf/SpecialGothicExpandedOne-Regular.ttf -------------------------------------------------------------------------------- /archives/fonts/specialgothic-condensed/otf/SpecialGothicCondensedOne-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/archives/fonts/specialgothic-condensed/otf/SpecialGothicCondensedOne-Regular.otf -------------------------------------------------------------------------------- /archives/fonts/specialgothic-condensed/ttf/SpecialGothicCondensedOne-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/archives/fonts/specialgothic-condensed/ttf/SpecialGothicCondensedOne-Regular.ttf -------------------------------------------------------------------------------- /archives/fonts/specialgothic-expanded/webfonts/SpecialGothicExpandedOne-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/archives/fonts/specialgothic-expanded/webfonts/SpecialGothicExpandedOne-Regular.woff2 -------------------------------------------------------------------------------- /archives/fonts/specialgothic-condensed/webfonts/SpecialGothicCondensedOne-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlistairMcCready/Special-Gothic/HEAD/archives/fonts/specialgothic-condensed/webfonts/SpecialGothicCondensedOne-Regular.woff2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | venv 3 | build.stamp 4 | proof 5 | node_modules 6 | package-lock.json 7 | package.json 8 | master_ufo 9 | instance_ufo 10 | 11 | # OS generated files # 12 | ###################### 13 | .DS_Store 14 | .DS_Store? 15 | ._* 16 | .Spotlight-V100 17 | .Trashes 18 | ehthumbs.db 19 | Thumbs.db 20 | -------------------------------------------------------------------------------- /scripts/update-custom-filter.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | GF_Latin_All = "https://github.com/googlefonts/glyphsets/raw/main/GF_glyphsets/Latin/glyphs/CustomFilter_GF_Latin.plist" 4 | dest = "sources/CustomFilter_GF_Latin_All.plist" 5 | 6 | r = requests.get(GF_Latin_All) 7 | with open(dest, "wb") as f: 8 | f.write(r.content) 9 | -------------------------------------------------------------------------------- /AUTHORS.txt: -------------------------------------------------------------------------------- 1 | # This is the official list of project authors for copyright purposes. The first name in the list (if there are several authors), will appear as "Principal design" in the "about" section of the font specimen on Google Fonts. 2 | # This file is distinct from the CONTRIBUTORS.txt file. 3 | # See the latter for an explanation. 4 | # 5 | # Names should be added to this file as: 6 | # Name or Organization 7 | 8 | Alistair McCready -------------------------------------------------------------------------------- /DESCRIPTION.en_us.html: -------------------------------------------------------------------------------- 1 |

Special Gothic is a multi-width sans serif typeface built as a contemporary reimagining of the raw tenacity offered up by early 20th century Gothic type styles.

2 |

Special Gothic was created for and in collaboration with Special Group to celebrate a monumental 15 years as an internationally renowned design and advertising studio.

3 |

To contribute, see github.com/AlistairMcCready/Special-Gothic.

-------------------------------------------------------------------------------- /scripts/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | My Font development 7 | 8 | 9 |

My Font testing pages

10 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /CONTRIBUTORS.txt: -------------------------------------------------------------------------------- 1 | # This is the list of people who have contributed to this project, 2 | # and includes those not listed in AUTHORS.txt because they are not 3 | # copyright authors. For example, company employees may be listed 4 | # here because their company holds the copyright and is listed there. 5 | # 6 | # When adding J Random Contributor's name to this file, either J's 7 | # name or J's organization's name should be added to AUTHORS.txt 8 | # 9 | # Names should be added to this file as: 10 | # Name 11 | 12 | Alistair McCready 13 | Wei Huang -------------------------------------------------------------------------------- /archives/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Build fonts 4 | 5 | set -e 6 | 7 | echo "Build Special Gothic" 8 | 9 | gftools builder config.yaml 10 | 11 | echo "Build Special Gothic Expanded" 12 | 13 | gftools builder config-expanded.yaml 14 | 15 | echo "Build Special Gothic Condensed" 16 | 17 | gftools builder config-condensed.yaml 18 | 19 | echo "Fonts built" 20 | 21 | # QA 22 | 23 | cd .. 24 | 25 | gftools qa -f fonts/specialgothic/ttf/*.ttf -a -gfb -o qa-specialgothic 26 | 27 | gftools qa -f fonts/specialgothic-condensed/ttf/*.ttf -a -gfb -o qa-specialgothic-condensed 28 | 29 | gftools qa -f fonts/specialgothic-expanded/ttf/*.ttf -a -gfb -o qa-specialgothic-expanded 30 | 31 | echo "QA done" 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /sources/config.yaml: -------------------------------------------------------------------------------- 1 | sources: 2 | - SpecialGothic.glyphs 3 | axisOrder: 4 | - wdth 5 | - wght 6 | familyName: Special Gothic 7 | cleanUp: true 8 | stat: 9 | SpecialGothic[wdth,wght].ttf: 10 | - name: Width 11 | tag: wdth 12 | values: 13 | - name: Condensed 14 | value: 75 15 | - name: SemiCondensed 16 | value: 87.5 17 | - name: Normal 18 | value: 100 19 | flags: 2 20 | - name: SemiExpanded 21 | value: 112.5 22 | - name: Normal 23 | value: 100 24 | flags: 2 25 | - name: Expanded 26 | value: 125 27 | - name: Weight 28 | tag: wght 29 | values: 30 | - name: Regular 31 | value: 400 32 | linkedValue: 700 33 | flags: 2 34 | - name: Medium 35 | value: 500 36 | - name: SemiBold 37 | value: 600 38 | - name: Bold 39 | value: 700 -------------------------------------------------------------------------------- /scripts/read-config.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # Yes, this is a Bad YAML Parser, but at this stage we are not in the 3 | # venv and do not know what modules the user has available, so for 4 | # maximum compatibility, we are just assuming a plain Python distribution. 5 | import argparse 6 | import re 7 | import sys 8 | import os 9 | 10 | parser = argparse.ArgumentParser() 11 | group = parser.add_mutually_exclusive_group(required=True) 12 | group.add_argument('--sources',action='store_true') 13 | group.add_argument('--family',action='store_true') 14 | args = parser.parse_args() 15 | 16 | with open(os.path.join("sources", "config.yaml")) as config: 17 | data = config.read() 18 | 19 | if args.family: 20 | m = re.search(r"(?m)^familyName: (.*)", data) 21 | if m: 22 | print(m[1]) 23 | sys.exit(0) 24 | else: 25 | print("Could not determine family name from config file!") 26 | sys.exit(1) 27 | 28 | toggle = False 29 | sources = [] 30 | for line in data.splitlines(): 31 | if re.match("^sources:", line): 32 | toggle = True 33 | continue 34 | if toggle: 35 | m = re.match(r"^\s+-\s*(.*)", line) 36 | if m: 37 | sources.append("sources/"+m[1]) 38 | else: 39 | toggle = False 40 | if sources: 41 | print(" ".join(sources)) 42 | sys.exit(0) 43 | else: 44 | print("Could not determine sources from config file!") 45 | sys.exit(1) 46 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SOURCES=$(shell python3 scripts/read-config.py --sources ) 2 | FAMILY=$(shell python3 scripts/read-config.py --family ) 3 | DRAWBOT_SCRIPTS=$(shell ls documentation/*.py) 4 | DRAWBOT_OUTPUT=$(shell ls documentation/*.py | sed 's/\.py/.png/g') 5 | 6 | help: 7 | @echo "###" 8 | @echo "# Build targets for $(FAMILY)" 9 | @echo "###" 10 | @echo 11 | @echo " make build: Builds the fonts and places them in the fonts/ directory" 12 | @echo " make test: Tests the fonts with fontbakery" 13 | @echo " make proof: Creates HTML proof documents in the proof/ directory" 14 | @echo " make images: Creates PNG specimen images in the documentation/ directory" 15 | @echo 16 | 17 | build: build.stamp 18 | 19 | venv: venv/touchfile 20 | 21 | build.stamp: venv .init.stamp sources/config.yaml $(SOURCES) 22 | rm -rf fonts 23 | (for config in sources/config*.yaml; do . venv/bin/activate; gftools builder $$config; done) && touch build.stamp 24 | 25 | .init.stamp: venv 26 | . venv/bin/activate; python3 scripts/first-run.py 27 | 28 | venv/touchfile: requirements.txt 29 | test -d venv || python3 -m venv venv 30 | . venv/bin/activate; pip install -Ur requirements.txt 31 | touch venv/touchfile 32 | 33 | test: venv build.stamp 34 | . 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.' 35 | 36 | proof: venv build.stamp 37 | . venv/bin/activate; mkdir -p out/ out/proof; diffenator2 proof $(shell find fonts/ttf -type f) -o out/proof 38 | 39 | images: venv build.stamp $(DRAWBOT_OUTPUT) 40 | git add documentation/*.png && git commit -m "Rebuild images" documentation/*.png 41 | 42 | %.png: %.py build.stamp 43 | python3 $< --output $@ 44 | 45 | clean: 46 | rm -rf venv 47 | find . -name "*.pyc" -delete 48 | 49 | update-project-template: 50 | npx update-template https://github.com/googlefonts/googlefonts-project-template/ 51 | 52 | update: 53 | pip install --upgrade $(dependency); pip freeze > requirements.txt 54 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | absl-py==2.0.0 2 | afdko==4.0.0 3 | appdirs==1.4.4 4 | attrs==23.1.0 5 | axisregistry==0.4.4 6 | babelfont==3.0.1 7 | beautifulsoup4==4.12.2 8 | beziers==0.5.0 9 | blackrenderer==0.6.0 10 | booleanOperations==0.9.0 11 | Brotli==1.1.0 12 | bump2version==1.0.1 13 | bumpfontversion==0.4.1 14 | cattrs==23.1.2 15 | certifi==2023.7.22 16 | cffi==1.16.0 17 | cffsubr==0.2.9.post1 18 | charset-normalizer==3.3.1 19 | click==8.1.7 20 | cmarkgfm==2022.10.27 21 | collidoscope==0.6.5 22 | colorlog==6.7.0 23 | commandlines==0.4.1 24 | compreffor==0.5.5 25 | cryptography==41.0.5 26 | cu2qu==1.6.7.post2 27 | defcon==0.10.3 28 | dehinter==4.0.0 29 | Deprecated==1.2.14 30 | diffenator2==0.2.13 31 | docopt==0.6.2 32 | drawbot-skia==0.5.0 33 | exceptiongroup==1.1.3 34 | font-v==2.1.0 35 | fontbakery==0.10.2 36 | fontFeatures==1.8.0 37 | fontmake==3.7.1 38 | fontMath==0.9.3 39 | fontParts==0.12.1 40 | fontPens==0.2.4 41 | fonttools==4.43.1 42 | freetype-py==2.3.0 43 | fs==2.4.16 44 | gflanguages==0.5.7 45 | gftools==0.9.35 46 | gitdb==4.0.11 47 | GitPython==3.1.40 48 | glyphsets==0.6.4 49 | glyphsLib==6.4.1 50 | h11==0.14.0 51 | hyperglot==0.4.5 52 | idna==3.4 53 | Jinja2==3.1.2 54 | kurbopy==0.10.40 55 | lxml==4.9.3 56 | markdown-it-py==3.0.0 57 | MarkupSafe==2.1.3 58 | mdurl==0.1.2 59 | munkres==1.1.4 60 | MutatorMath==3.0.1 61 | nanoemoji==0.15.1 62 | ninja==1.11.1.1 63 | num2words==0.5.13 64 | numpy==1.26.1 65 | openstep-plist==0.3.1 66 | opentype-sanitizer==9.1.0 67 | opentypespec==1.9.1 68 | orjson==3.9.10 69 | outcome==1.3.0.post0 70 | packaging==23.2 71 | picosvg==0.22.1 72 | Pillow==10.1.0 73 | pip-api==0.0.30 74 | pngquant-cli==2.17.0.post5 75 | protobuf==3.20.3 76 | psautohint==2.4.0 77 | pyahocorasick==2.0.0 78 | pybind11==2.11.1 79 | pyclipper==1.3.0.post5 80 | pycparser==2.21 81 | pygit2==1.13.2 82 | PyGithub==2.1.1 83 | Pygments==2.16.1 84 | PyJWT==2.8.0 85 | PyNaCl==1.5.0 86 | pyparsing==3.1.1 87 | PySocks==1.7.1 88 | python-bidi==0.4.2 89 | python-dateutil==2.8.2 90 | PyYAML==6.0.1 91 | regex==2023.10.3 92 | requests==2.31.0 93 | resvg-cli==0.22.0.post3 94 | rich==13.6.0 95 | rstr==3.2.2 96 | selenium==4.14.0 97 | sh==2.0.6 98 | shaperglot==0.3.1 99 | six==1.16.0 100 | skia-pathops==0.8.0.post1 101 | skia-python==87.5 102 | smmap==5.0.1 103 | sniffio==1.3.0 104 | sortedcontainers==2.4.0 105 | soupsieve==2.5 106 | sre-yield==1.2 107 | statmake==0.6.0 108 | strictyaml==1.7.3 109 | stringbrewer==0.0.1 110 | tabulate==0.9.0 111 | termcolor==2.3.0 112 | toml==0.10.2 113 | tqdm==4.66.1 114 | trio==0.22.2 115 | trio-websocket==0.11.1 116 | ttfautohint-py==0.5.1 117 | typing_extensions==4.8.0 118 | ufo2ft==2.33.4 119 | ufoLib2==0.16.0 120 | ufolint==1.2.0 121 | ufonormalizer==0.6.1 122 | ufoProcessor==1.9.0 123 | uharfbuzz==0.37.3 124 | unicodedata2==15.1.0 125 | Unidecode==1.3.7 126 | urllib3==2.0.7 127 | vharfbuzz==0.2.0 128 | vttLib==0.12.0 129 | wrapt==1.15.0 130 | wsproto==1.2.0 131 | youseedee==0.3.0 132 | zopfli==0.2.3 133 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Special Gothic 2 | 3 | Special Gothic is a multi-width sans serif typeface built as a contemporary reimagining of the raw tenacity offered up by early 20th century Gothic type styles. 4 | 5 | Special Gothic was created for and in collaboration with Special Group to celebrate a monumental 15 years as an internationally renowned design and advertising studio. 6 | 7 | ### [Download the latest fonts](https://github.com/AlistairMcCready/Special-Gothic/releases) 8 | 9 | ![Sample Image](documentation/SG.png) 10 | 11 | ## About 12 | 13 | [Alistair McCready](https://monolith.nz/) is a New Zealand born designer, currently working in Tāmaki Makaurau / Auckland. He believes strongly that if we want to see the future, we need to understand our past. Since 2015, Alistair’s studio; Monolith — has tasked itself with producing work composed out of attention to aesthetic and technological detail. Monolith is founded on the belief that the best ideas are only strengthened by the ability to execute them with care and craft, working alongside a international design studios, type foundries and independent organisations. 14 | 15 | Production and GitHub assistance by [Wei Huang](https://github.com/weiweihuanghuang). 16 | 17 | ## Building 18 | 19 | Fonts are built automatically by GitHub Actions - take a look in the "Actions" tab for the latest build. 20 | 21 | If you want to build fonts manually on your own computer: 22 | 23 | * `make build` will produce font files. 24 | * `make test` will run [FontBakery](https://github.com/googlefonts/fontbakery)'s quality assurance tests. 25 | * `make proof` will generate HTML proof files. 26 | 27 | The proof files and QA tests are also available automatically via GitHub Actions - look at `https://github.com/AlistairMcCready/Special-Gothic`. 28 | 29 | ## Changelog 30 | 31 | **31 October 2022. Version 1.00** 32 | 33 | - INITIAL UPLOAD 34 | 35 | ## License 36 | 37 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 38 | This license is available with a FAQ at 39 | https://scripts.sil.org/OFL 40 | 41 | ## Repository Layout 42 | 43 | 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. 44 | 45 | [![][Fontbakery]](https://AlistairMcCready.github.io/Special-Gothic/fontbakery/fontbakery-report.html) 46 | [![][Universal]](https://AlistairMcCready.github.io/Special-Gothic/fontbakery/fontbakery-report.html) 47 | [![][GF Profile]](https://AlistairMcCready.github.io/Special-Gothic/fontbakery/fontbakery-report.html) 48 | [![][Outline Correctness]](https://AlistairMcCready.github.io/Special-Gothic/fontbakery/fontbakery-report.html) 49 | [![][Shaping]](https://AlistairMcCready.github.io/Special-Gothic/fontbakery/fontbakery-report.html) 50 | 51 | [Fontbakery]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FAlistairMcCready%2FSpecial-Gothic%2Fgh-pages%2Fbadges%2Foverall.json 52 | [GF Profile]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FAlistairMcCready%2FSpecial-Gothic%2Fgh-pages%2Fbadges%2FGoogleFonts.json 53 | [Outline Correctness]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FAlistairMcCready%2FSpecial-Gothic%2Fgh-pages%2Fbadges%2FOutlineCorrectnessChecks.json 54 | [Shaping]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FAlistairMcCready%2FSpecial-Gothic%2Fgh-pages%2Fbadges%2FShapingChecks.json 55 | [Universal]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FAlistairMcCready%2FSpecial-Gothic%2Fgh-pages%2Fbadges%2FUniversal.json -------------------------------------------------------------------------------- /.github/workflows/build.yaml: -------------------------------------------------------------------------------- 1 | name: Build font and specimen 2 | 3 | on: [push, release] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - name: Set up Python 3.10 11 | uses: actions/setup-python@v2 12 | with: 13 | python-version: "3.10" 14 | - name: Install sys tools/deps 15 | run: | 16 | sudo apt-get update 17 | sudo apt-get install ttfautohint 18 | sudo snap install yq 19 | - uses: actions/cache@v2 20 | with: 21 | path: ./venv/ 22 | key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }} 23 | restore-keys: | 24 | ${{ runner.os }}-venv- 25 | - name: Do first-run script if necessary 26 | run: make .init.stamp 27 | if: github.repository != 'googlefonts/googlefonts-project-template' 28 | - uses: stefanzweifel/git-auto-commit-action@v4 29 | name: First-run setup 30 | if: github.repository != 'googlefonts/googlefonts-project-template' 31 | with: 32 | file_pattern: .init.stamp README.md requirements.txt OFL.txt 33 | commit_message: "Personalize for this repo" 34 | - name: gen zip file name 35 | id: zip-name 36 | shell: bash 37 | # Set the archive name to repo name + "-assets" e.g "MavenPro-assets" 38 | run: echo "ZIP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-fonts" >> $GITHUB_ENV 39 | # If a new release is cut, use the release tag to auto-bump the source files 40 | - name: Bump release 41 | if: github.event_name == 'release' 42 | run: | 43 | . venv/bin/activate 44 | SRCS=$(yq e ".sources[]" sources/config.yaml) 45 | TAG_NAME=${GITHUB_REF/refs\/tags\//} 46 | echo "Bumping $SRCS to $TAG_NAME" 47 | for src in $SRCS 48 | do 49 | bumpfontversion sources/$src --new-version $TAG_NAME; 50 | done 51 | - name: Build font 52 | run: make build 53 | - name: Check with fontbakery 54 | run: make test 55 | continue-on-error: true 56 | - name: proof 57 | run: make proof 58 | - name: setup site 59 | run: cp scripts/index.html out/index.html 60 | - name: Deploy 61 | uses: peaceiris/actions-gh-pages@v3 62 | if: ${{ github.ref == 'refs/heads/main' }} 63 | with: 64 | github_token: ${{ secrets.GITHUB_TOKEN }} 65 | publish_dir: ./out 66 | - name: Archive artifacts 67 | uses: actions/upload-artifact@v2 68 | with: 69 | name: ${{ env.ZIP_NAME }} 70 | path: | 71 | fonts 72 | out 73 | outputs: 74 | zip_name: ${{ env.ZIP_NAME }} 75 | release: 76 | # only run if the commit is tagged... 77 | if: github.event_name == 'release' 78 | # ... and it builds successfully 79 | needs: 80 | - build 81 | runs-on: ubuntu-latest 82 | env: 83 | ZIP_NAME: ${{ needs.build.outputs.zip_name }} 84 | steps: 85 | - uses: actions/checkout@v2 86 | - name: Download artefact files 87 | uses: actions/download-artifact@v2 88 | with: 89 | name: ${{ env.ZIP_NAME }} 90 | path: ${{ env.ZIP_NAME }} 91 | - name: Zip files 92 | run: zip -r ${{ env.ZIP_NAME }}.zip ${{ env.ZIP_NAME }} 93 | - name: Upload binaries to release 94 | uses: svenstaro/upload-release-action@v2 95 | with: 96 | repo_token: ${{ secrets.GITHUB_TOKEN }} 97 | file: ${{ env.ZIP_NAME }}.zip 98 | asset_name: ${{ env.ZIP_NAME }}.zip 99 | tag: ${{ github.ref }} 100 | overwrite: true 101 | body: "Production ready fonts" 102 | -------------------------------------------------------------------------------- /scripts/first-run.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This script is run the first time any action is performed after the repository 4 | # is cloned. If you are reading this because the automatic initialization failed, 5 | # skip down to the section headed "INITIALIZATION STEPS". 6 | 7 | from sh import git 8 | import datetime 9 | import re 10 | import sys 11 | from urllib.parse import quote 12 | import subprocess 13 | 14 | BASE_OWNER = "googlefonts" 15 | BASE_REPONAME = "googlefonts-project-template" 16 | DUMMY_URL = "https://yourname.github.io/your-font-repository-name" 17 | 18 | 19 | def repo_url(owner, name): 20 | return f"https://github.com/{owner}/{name}" 21 | 22 | 23 | def web_url(owner, name): 24 | return f"https://{owner}.github.io/{name}" 25 | 26 | 27 | def raw_url(owner, name): 28 | return f"https://raw.githubusercontent.com/{owner}/{name}" 29 | 30 | 31 | def touch(): 32 | open(".init.stamp", "w").close() 33 | 34 | 35 | def lose(msg, e=None): 36 | print(msg) 37 | print("You will need to do the initialization steps manually.") 38 | print("Read scripts/first-run.py for more instructions how to do this.") 39 | if e: 40 | print( 41 | "\nHere's an additional error message which may help diagnose the problem." 42 | ) 43 | raise e 44 | sys.exit(1) 45 | 46 | 47 | try: 48 | my_repo_url = git.remote("get-url", "origin") 49 | except Exception as e: 50 | lose("Could not use git to find my own repository URL", e) 51 | 52 | m = re.match(r"(?:https://github.com/|git@github.com:)(.*)/(.*)/?", str(my_repo_url)) 53 | if not m: 54 | lose( 55 | f"My git repository URL ({my_repo_url}) didn't look what I expected - are you hosting this on github?" 56 | ) 57 | 58 | owner, reponame = m[1], m[2] 59 | 60 | if owner == BASE_OWNER and reponame == BASE_REPONAME: 61 | print("I am being run on the upstream repository (probably due to CI)") 62 | print("All I'm going to do is create the touch file and quit.") 63 | touch() 64 | sys.exit() 65 | 66 | # INITIALIZATION STEPS 67 | 68 | # First, the README file contains URLs to pages in the `gh-pages` branch of the 69 | # repo. When initially cloned, these URLs will point to the 70 | # googlefonts/Unified-Font-Repository itself. But downstream users want links 71 | # and badges about their own font, not ours! So any URLs need to be adjusted to 72 | # refer to the end user's repository. 73 | 74 | # We will also pin the dependencies so future builds are reproducible. 75 | 76 | readme = open("README.md").read() 77 | 78 | print( 79 | "Fixing URLs:", web_url(BASE_OWNER, BASE_REPONAME), "->", web_url(owner, reponame) 80 | ) 81 | 82 | readme = readme.replace(web_url(BASE_OWNER, BASE_REPONAME), web_url(owner, reponame)) 83 | # In the badges, the URLs to raw.githubusercontent.com are URL-encoded as they 84 | # are passed to shields.io. 85 | print( 86 | "Fixing URLs:", 87 | quote(raw_url(BASE_OWNER, BASE_REPONAME), safe=""), 88 | "->", 89 | quote(raw_url(owner, reponame), safe=""), 90 | ) 91 | readme = readme.replace( 92 | quote(raw_url(BASE_OWNER, BASE_REPONAME), safe=""), 93 | quote(raw_url(owner, reponame), safe=""), 94 | ) 95 | 96 | print( 97 | "Fixing URLs:", 98 | DUMMY_URL, 99 | "->", 100 | web_url(owner, reponame), 101 | ) 102 | readme = readme.replace( 103 | f"`{DUMMY_URL}`", 104 | web_url(owner, reponame), 105 | ) 106 | 107 | with open("README.md", "w") as fh: 108 | fh.write(readme) 109 | 110 | # Fix the OFL 111 | 112 | ofl = open("OFL.txt").read() 113 | ofl = ofl.replace(web_url(BASE_OWNER, BASE_REPONAME), web_url(owner, reponame)) 114 | ofl = ofl.replace("My Font", reponame.title()) 115 | ofl = ofl.replace("20**", str(datetime.date.today().year)) 116 | with open("OFL.txt", "w") as fh: 117 | fh.write(ofl) 118 | 119 | # Pin the dependencies 120 | print("Pinning dependencies") 121 | dependencies = subprocess.check_output(["pip", "freeze"]) 122 | with open("requirements.txt", "wb") as dependency_file: 123 | dependency_file.write(dependencies) 124 | 125 | # Finally, we add a "touch file" called ".init.stamp" to the repository which 126 | # prevents this first-run process from being run again. 127 | touch() 128 | -------------------------------------------------------------------------------- /OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2023 The Special Gothic Project Authors (https://github.com/AlistairMcCready/Special-Gothic/) 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | https://openfontlicense.org 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /documentation/image1.py: -------------------------------------------------------------------------------- 1 | # This script is meant to be run from the root level 2 | # of your font's git repository. For example, from a Unix terminal: 3 | # $ git clone my-font 4 | # $ cd my-font 5 | # $ python3 documentation/image1.py --output documentation/image1.png 6 | 7 | # Import moduels from external python packages: https://pypi.org/ 8 | from drawbot_skia.drawbot import * 9 | from fontTools.ttLib import TTFont 10 | from fontTools.misc.fixedTools import floatToFixedToStr 11 | 12 | # Import moduels from the Python Standard Library: https://docs.python.org/3/library/ 13 | import subprocess 14 | import sys 15 | import argparse 16 | 17 | # Constants, these are the main "settings" for the image 18 | WIDTH, HEIGHT, MARGIN, FRAMES = 2048, 2048, 128, 1 19 | FONT_PATH = "fonts/ttf/SpecialGothic-Regular.ttf" 20 | FONT_LICENSE = "OFL v1.1" 21 | AUXILIARY_FONT = "Helvetica" 22 | AUXILIARY_FONT_SIZE = 48 23 | BIG_TEXT = "Aa" 24 | BIG_TEXT_FONT_SIZE = 1024 25 | BIG_TEXT_SIDE_MARGIN = MARGIN * 3.1 26 | BIG_TEXT_BOTTOM_MARGIN = MARGIN * 5.5 27 | GRID_VIEW = False # Change this to "True" for a grid overlay 28 | 29 | # Handel the "--output" flag 30 | # For example: $ python3 documentation/image1.py --output documentation/image1.png 31 | parser = argparse.ArgumentParser() 32 | parser.add_argument("--output", metavar="PNG", help="where to write the PNG file") 33 | args = parser.parse_args() 34 | 35 | # Load the font with the parts of fonttools that are imported with the line: 36 | # from fontTools.ttLib import TTFont 37 | # Docs Link: https://fonttools.readthedocs.io/en/latest/ttLib/ttFont.html 38 | ttFont = TTFont(FONT_PATH) 39 | 40 | # Constants that are worked out dynamically 41 | MY_URL = subprocess.check_output("git remote get-url origin", shell=True).decode() 42 | MY_HASH = subprocess.check_output("git rev-parse --short HEAD", shell=True).decode() 43 | FONT_NAME = ttFont["name"].getDebugName(4) 44 | FONT_VERSION = "v%s" % floatToFixedToStr(ttFont["head"].fontRevision, 16) 45 | 46 | 47 | # Draws a grid 48 | def grid(): 49 | stroke(1, 0, 0, 0.75) 50 | strokeWidth(2) 51 | STEP_X, STEP_Y = 0, 0 52 | INCREMENT_X, INCREMENT_Y = MARGIN / 2, MARGIN / 2 53 | rect(MARGIN, MARGIN, WIDTH - (MARGIN * 2), HEIGHT - (MARGIN * 2)) 54 | for x in range(29): 55 | polygon((MARGIN + STEP_X, MARGIN), (MARGIN + STEP_X, HEIGHT - MARGIN)) 56 | STEP_X += INCREMENT_X 57 | for y in range(29): 58 | polygon((MARGIN, MARGIN + STEP_Y), (WIDTH - MARGIN, MARGIN + STEP_Y)) 59 | STEP_Y += INCREMENT_Y 60 | polygon((WIDTH / 2, 0), (WIDTH / 2, HEIGHT)) 61 | polygon((0, HEIGHT / 2), (WIDTH, HEIGHT / 2)) 62 | 63 | 64 | # Remap input range to VF axis range 65 | # This is useful for animation 66 | # (E.g. sinewave(-1,1) to wght(100,900)) 67 | def remap(value, inputMin, inputMax, outputMin, outputMax): 68 | inputSpan = inputMax - inputMin # FIND INPUT RANGE SPAN 69 | outputSpan = outputMax - outputMin # FIND OUTPUT RANGE SPAN 70 | valueScaled = float(value - inputMin) / float(inputSpan) 71 | return outputMin + (valueScaled * outputSpan) 72 | 73 | 74 | # Draw the page/frame and a grid if "GRID_VIEW" is set to "True" 75 | def draw_background(): 76 | newPage(WIDTH, HEIGHT) 77 | fill(0) 78 | rect(-2, -2, WIDTH + 2, HEIGHT + 2) 79 | if GRID_VIEW: 80 | grid() 81 | else: 82 | pass 83 | 84 | 85 | # Draw main text 86 | def draw_main_text(): 87 | fill(1) 88 | stroke(None) 89 | font(FONT_PATH) 90 | fontSize(BIG_TEXT_FONT_SIZE) 91 | # Adjust this line to center main text manually. 92 | # TODO: This should be done automatically when drawbot-skia 93 | # has support for textBox() and FormattedString 94 | #text(BIG_TEXT, ((WIDTH / 2) - MARGIN * 4.75, (HEIGHT / 2) - MARGIN * 2.5)) 95 | text(BIG_TEXT, (BIG_TEXT_SIDE_MARGIN, BIG_TEXT_BOTTOM_MARGIN)) 96 | 97 | 98 | # Divider lines 99 | def draw_divider_lines(): 100 | stroke(1) 101 | strokeWidth(4) 102 | lineCap("round") 103 | line((MARGIN, HEIGHT - MARGIN), (WIDTH - MARGIN, HEIGHT - MARGIN)) 104 | line((MARGIN, MARGIN + (MARGIN / 2)), (WIDTH - MARGIN, MARGIN + (MARGIN / 2))) 105 | stroke(None) 106 | 107 | 108 | # Draw text describing the font and it's git status & repo URL 109 | def draw_auxiliary_text(): 110 | # Setup 111 | font(AUXILIARY_FONT) 112 | fontSize(AUXILIARY_FONT_SIZE) 113 | POS_TOP_LEFT = (MARGIN, HEIGHT - MARGIN * 1.5) 114 | POS_TOP_RIGHT = (WIDTH - MARGIN, HEIGHT - MARGIN * 1.5) 115 | POS_BOTTOM_LEFT = (MARGIN, MARGIN) 116 | POS_BOTTOM_RIGHT = (WIDTH - MARGIN * 0.95, MARGIN) 117 | URL_AND_HASH = MY_URL + "at commit " + MY_HASH 118 | URL_AND_HASH = URL_AND_HASH.replace("\n", " ") 119 | # Draw Text 120 | text(FONT_NAME, POS_TOP_LEFT, align="left") 121 | text(FONT_VERSION, POS_TOP_RIGHT, align="right") 122 | text(URL_AND_HASH, POS_BOTTOM_LEFT, align="left") 123 | text(FONT_LICENSE, POS_BOTTOM_RIGHT, align="right") 124 | 125 | 126 | # Build and save the image 127 | if __name__ == "__main__": 128 | draw_background() 129 | draw_main_text() 130 | draw_divider_lines() 131 | draw_auxiliary_text() 132 | # Save output, using the "--output" flag location 133 | saveImage(args.output) 134 | # Print done in the terminal 135 | print("DrawBot: Done") 136 | --------------------------------------------------------------------------------