mirror of
https://github.com/github/hubot-sans.git
synced 2024-12-27 22:50:33 -05:00
Added build system
This commit is contained in:
parent
40f44e2968
commit
05ff1edaf6
3 changed files with 41 additions and 0 deletions
13
sources/build.sh
Normal file
13
sources/build.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
#source ../env/bin/activate
|
||||
|
||||
echo "Build VF"
|
||||
|
||||
gftools builder config.yaml
|
||||
|
||||
echo "Remove italic instances in FVAR"
|
||||
|
||||
python3 remove-FVAR-italics.py ../fonts/variable/HubotSans[slnt,wdth,wght].ttf
|
||||
|
||||
echo "Complete"
|
10
sources/config.yaml
Normal file
10
sources/config.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
sources:
|
||||
- HubotSans.glyphs
|
||||
# buildOTF: False
|
||||
# buildWebfont: False
|
||||
# buildTTF: false
|
||||
axisOrder:
|
||||
- slnt
|
||||
- wdth
|
||||
- wght
|
||||
familyName: "Hubot Sans"
|
18
sources/remove-FVAR-italics.py
Normal file
18
sources/remove-FVAR-italics.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
from axisregistry import AxisRegistry
|
||||
from fontTools.ttLib import TTFont
|
||||
import sys
|
||||
import copy
|
||||
|
||||
registry = AxisRegistry()
|
||||
|
||||
font = TTFont(sys.argv[-1])
|
||||
|
||||
allowed = [weight.name for weight in registry["wght"].fallback]
|
||||
|
||||
for instance in copy.copy(font["fvar"].instances):
|
||||
name = font["name"].getName(instance.subfamilyNameID, 3, 1, 1033).toUnicode()
|
||||
print(name)
|
||||
if name not in allowed:
|
||||
font["fvar"].instances.remove(instance)
|
||||
|
||||
font.save(sys.argv[-1])
|
Loading…
Reference in a new issue