Files

15 lines
437 B
Bash

#!/bin/bash
set -e
python3 -m pip install --quiet --break-system-packages fonttools 2>/dev/null || true
python3 - <<'EOF'
from fontTools.ttLib import TTFont
p='/tmp/Montserrat.ttf'
f=TTFont(p)
print('family:', f['name'].getDebugName(1), '| subfamily:', f['name'].getDebugName(2))
if 'fvar' in f:
for a in f['fvar'].axes:
print(' axis', a.axisTag, a.minValue, a.defaultValue, a.maxValue)
else:
print(' static font')
EOF