Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Besley* v3.1.1 [DRAFT] #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions sources/build-otf.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -e
#source ../env/bin/activate

Expand Down Expand Up @@ -35,8 +35,9 @@ TT_DIR=../fonts/otf
rm -rf $TT_DIR
mkdir -p $TT_DIR

fontmake -m designspace/$fontName.designspace -i -o otf --output-dir $TT_DIR
fontmake -m designspace/$fontName_it.designspace -i -o otf --output-dir $TT_DIR
parallel --bar bash -c < \
<(echo fontmake -m designspace/$fontName.designspace -i -o otf --output-dir $TT_DIR;
echo fontmake -m designspace/$fontName_it.designspace -i -o otf --output-dir $TT_DIR)

##########################################

Expand Down
52 changes: 36 additions & 16 deletions sources/build-variable.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/bin/sh
#!/bin/bash
set -e

fontName="Besley"
fontName_it="Besley-Italic"
axes="wdth,wght"
FONTNAMES=("Besley" "Besley-Italic")
AXES="wdth,wght"

##########################################

Expand All @@ -29,30 +28,51 @@ fi
##########################################

echo ".
GENERATING VARIABLE
CLEANING UP IF NEEDED
."
VF_DIR=../fonts/variable
rm -rf $VF_DIR
mkdir -p $VF_DIR
mkdir -p ./"$VF_DIR" || true
for f in `find "$VF_DIR" -iname '*.ttf' -or -iname '*.otf' -type f`; do
rm "$f"
echo "Deleted $f"
done

fontmake -m designspace/$fontName.designspace -o variable --output-path $VF_DIR/$fontName[$axes].ttf
fontmake -m designspace/$fontName_it.designspace -o variable --output-path $VF_DIR/$fontName_it[$axes].ttf
echo ".
GENERATING VARIABLE
."
FONTS_GLYF=()
FONTS_CFF2=()

for fontName in "${FONTNAMES[@]}"; do
FONTS_GLYF+=("${VF_DIR}/${fontName}[${AXES}].ttf")
FONTS_CFF2+=("${VF_DIR}/${fontName}[${AXES}].otf")
done

parallel bash -c < \
<(i=-1; for font in "${FONTS_GLYF[@]}"; do i=$i+1;
echo fontmake -m designspace/"${FONTNAMES[$i]}".designspace -o variable --output-path "${font@Q}"
done

i=-1; for font in "${FONTS_CFF2[@]}"; do i=$i+1;
echo fontmake -m designspace/"${FONTNAMES[$i]}".designspace -o variable-cff2 --output-path "${font@Q}"
done)

##########################################

echo ".
POST-PROCESSING VF
."
vfs=$(ls $VF_DIR/*.ttf)
for font in $vfs
for font in "${FONTS_GLYF[@]}"
do
gftools fix-nonhinting $font $font.fix
mv $font.fix $font
gftools fix-unwanted-tables --tables MVAR $font
TMPFILE=$(mktemp)
gftools fix-nonhinting "$font" "$TMPFILE"
gftools fix-unwanted-tables --tables MVAR "$TMPFILE"
mv "$TMPFILE" "$font"
done

statmake --designspace designspace/$fontName.designspace $VF_DIR/$fontName[$axes].ttf
statmake --designspace designspace/$fontName_it.designspace $VF_DIR/$fontName_it[$axes].ttf
for font in "${FONTS_GLYF[@]}" "${FONTS_CFF2[@]}"; do
statmake --designspace designspace/$fontName.designspace $font
done

rm $VF_DIR/*gasp*

Expand Down
14 changes: 12 additions & 2 deletions sources/designspace/Besley.designspace
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,18 @@

<dict>
<key>name</key>
<string>Regular</string>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EwonRael I need to make sure you're OK with these changes. These are the names Google insists on.

<string>Normal</string>
<key>value</key>
<integer>100</integer>
<key>flags</key>
<array>
<string>ElidableAxisValueName</string>
</array>
</dict>

<dict>
<key>name</key>
<string>Narrow</string>
<string>SemiCondensed</string>
<key>value</key>
<string>87.5</string>
</dict>
Expand All @@ -270,6 +274,12 @@
<integer>75</integer>
</dict>

<dict>
<key>name</key>
<string>Extended</string>
<key>value</key>
<integer>125</integer>
</dict>
</array>
</dict>

Expand Down
Loading