New Android deliverables
This commit is contained in:
parent
5b1d953b6c
commit
07fb9c9a48
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
43
build-gf.sh
43
build-gf.sh
|
@ -1,10 +1,43 @@
|
|||
#!/bin/sh
|
||||
SERIF_SOURCES=Serif/Variable/TTF/Subset/*ttf
|
||||
SANS_SOURCES=Sans/Variable/TTF/Subset/*ttf
|
||||
STYLE=ttf
|
||||
|
||||
echo "Building for Google Fonts"
|
||||
# This is the GF deliverables; these are subset
|
||||
SERIF_SOURCES=Serif/Variable/*/Subset/*$STYLE
|
||||
SANS_SOURCES=Sans/Variable/*/Subset/*$STYLE
|
||||
|
||||
python3 google-fonts/hotfix.py --output-dir=google-fonts $SERIF_SOURCES $SANS_SOURCES
|
||||
add-chws -o google-fonts google-fonts/*ttf
|
||||
add-chws -o google-fonts google-fonts/*$STYLE
|
||||
|
||||
echo "Building for Android"
|
||||
# Instance for Android
|
||||
# We don't use the subset versions here because we want to
|
||||
# use the shared glyf/gvar table in the eventual TTC
|
||||
SERIF_SOURCES=Serif/Variable/*/*$STYLE
|
||||
SANS_SOURCES=Sans/Variable/*/*$STYLE
|
||||
|
||||
mkdir -p android/instances
|
||||
|
||||
VARIATION="wght=400:900"
|
||||
VARIATION_FILENAME=`echo $VARIATION | sed "s/:/-/" | sed "s/=/-/"`
|
||||
|
||||
for i in $SANS_SOURCES $SERIF_SOURCES
|
||||
do
|
||||
OUTFILE=android/instances/`basename $i | sed "s/.$STYLE/-$VARIATION_FILENAME.$STYLE/"`
|
||||
echo "$i => " $OUTFILE
|
||||
if [[ $VARIATION == "full" ]]
|
||||
then
|
||||
cp $i $OUTFILE
|
||||
else
|
||||
fonttools varLib.instancer -o $OUTFILE $i $VARIATION
|
||||
fi
|
||||
# Hotfix in place
|
||||
python3 google-fonts/hotfix.py -o $OUTFILE $OUTFILE
|
||||
done
|
||||
add-chws -o android/instances/ android/instances/*ttf
|
||||
|
||||
# Build TTCs for Android
|
||||
fonttools ttLib -o google-fonts/'NotoSansCJK[wght].ttf.ttc' google-fonts/NotoSans*.ttf
|
||||
fonttools ttLib -o google-fonts/'NotoSerifCJK[wght].ttf.ttc' google-fonts/NotoSerif*.ttf
|
||||
fonttools ttLib -o android/'NotoSansCJK'-$VARIATION_FILENAME.$STYLE.ttc android/instances/NotoSans*.$STYLE
|
||||
woff2_compress android/'NotoSansCJK'-$VARIATION_FILENAME.$STYLE.ttc
|
||||
fonttools ttLib -o android/'NotoSerifCJK'-$VARIATION_FILENAME.$STYLE.ttc android/instances/NotoSerif*.$STYLE
|
||||
woff2_compress android/'NotoSerifCJK'-$VARIATION_FILENAME.$STYLE.ttc
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue