-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from pkq/SVGpatch
Remove SVG table to enable color-coded text on macOS Big Sur
- Loading branch information
Showing
19 changed files
with
42 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,5 @@ RomanMasters/colors_2 | |
ItalicMasters/colors_0 | ||
ItalicMasters/colors_1 | ||
ItalicMasters/colors_2 | ||
|
||
afdko_env/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,44 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env sh | ||
|
||
family=Hasklig | ||
romanWeights='Black Bold ExtraLight Light Medium Regular Semibold' | ||
italicWeights='BlackIt BoldIt ExtraLightIt LightIt MediumIt It SemiboldIt' | ||
set -e | ||
|
||
# path to Python script that adds the SVG table | ||
addSVG=$(cd $(dirname "$0") && pwd -P)/addSVGtable.py | ||
roman_weights=(Black Bold ExtraLight Light Medium Regular Semibold) | ||
italic_weights=(BlackIt BoldIt ExtraLightIt LightIt MediumIt It SemiboldIt) | ||
|
||
# path to UVS file | ||
UVS=$(cd $(dirname "$0") && pwd -P)/uvs.txt | ||
# get absolute path to bash script | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | ||
|
||
# clean existing build artifacts | ||
rm -rf target/ | ||
otfDir="target/" | ||
mkdir -p $otfDir | ||
rm -rf $DIR/target/ | ||
otf_dir="$DIR/target/OTF" | ||
mkdir -p $otf_dir | ||
|
||
for w in $romanWeights | ||
function build_font { | ||
# $1 is Roman or Italic | ||
# $2 is weight name | ||
font_dir=$DIR/$1/$2 | ||
font_ufo=$font_dir/font.ufo | ||
ps_name=$family-$2 | ||
echo $ps_name | ||
echo "Building OTF ..." | ||
# -r is for "release mode" | ||
# (subroutinization + applied glyph order) | ||
makeotf -f $font_ufo -r -omitMacNames | ||
|
||
# move font files to target directory | ||
mv $font_dir/$ps_name.otf $otf_dir | ||
echo "Done with $ps_name" | ||
echo "" | ||
echo "" | ||
} | ||
|
||
for w in ${roman_weights[@]} | ||
do | ||
makeotf -f Roman/$w/font.ufo -r -ci "$UVS" -o $otfDir/$family-$w.otf | ||
rm Roman/$w/current.fpr # remove default options file from the source tree after building | ||
"$addSVG" $otfDir/$family-$w.otf svg | ||
build_font Roman $w | ||
done | ||
|
||
for w in $italicWeights | ||
for w in ${italic_weights[@]} | ||
do | ||
makeotf -f Italic/$w/font.ufo -r -ci "$UVS" -o $otfDir/$family-$w.otf | ||
rm Italic/$w/current.fpr # remove default options file from the source tree after building | ||
"$addSVG" $otfDir/$family-$w.otf svg | ||
build_font Italic $w | ||
done |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.