mirror of
https://github.com/adobe-fonts/source-sans.git
synced 2024-12-30 14:26:16 +01:00
Submits WIP.
This commit is contained in:
parent
72b68f0933
commit
6a8b187c95
8 changed files with 113 additions and 29 deletions
38
Italic/Masters/STAT.fea
Normal file
38
Italic/Masters/STAT.fea
Normal file
|
@ -0,0 +1,38 @@
|
|||
table STAT {
|
||||
|
||||
ElidedFallbackName { name "Italic"; };
|
||||
|
||||
DesignAxis wght 0 { name "Weight"; };
|
||||
|
||||
AxisValue {
|
||||
location wght 200 200 - 250;
|
||||
name "ExtraLight Italic";
|
||||
};
|
||||
|
||||
AxisValue {
|
||||
location wght 300 250 - 350;
|
||||
name "Light Italic";
|
||||
};
|
||||
|
||||
AxisValue {
|
||||
location wght 400 350 - 450;
|
||||
name "Italic";
|
||||
flag ElidableAxisValueName;
|
||||
};
|
||||
|
||||
AxisValue {
|
||||
location wght 600 550 - 650;
|
||||
name "Semibold Italic";
|
||||
};
|
||||
|
||||
AxisValue {
|
||||
location wght 700 650 - 750;
|
||||
name "Bold Italic";
|
||||
};
|
||||
|
||||
AxisValue {
|
||||
location wght 900 800 - 900;
|
||||
name "Black Italic";
|
||||
};
|
||||
|
||||
} STAT;
|
38
Roman/Masters/STAT.fea
Normal file
38
Roman/Masters/STAT.fea
Normal file
|
@ -0,0 +1,38 @@
|
|||
table STAT {
|
||||
|
||||
ElidedFallbackName { name "Regular"; };
|
||||
|
||||
DesignAxis wght 0 { name "Weight"; };
|
||||
|
||||
AxisValue {
|
||||
location wght 200 200 - 250;
|
||||
name "ExtraLight";
|
||||
};
|
||||
|
||||
AxisValue {
|
||||
location wght 300 250 - 350;
|
||||
name "Light";
|
||||
};
|
||||
|
||||
AxisValue {
|
||||
location wght 400 350 - 450;
|
||||
name "Regular";
|
||||
flag ElidableAxisValueName;
|
||||
};
|
||||
|
||||
AxisValue {
|
||||
location wght 600 550 - 650;
|
||||
name "Semibold";
|
||||
};
|
||||
|
||||
AxisValue {
|
||||
location wght 700 650 - 750;
|
||||
name "Bold";
|
||||
};
|
||||
|
||||
AxisValue {
|
||||
location wght 900 800 - 900;
|
||||
name "Black";
|
||||
};
|
||||
|
||||
} STAT;
|
|
@ -1 +1,3 @@
|
|||
# inlcuded by /SourceSans3/featuresVar.fea
|
||||
|
||||
nameid 25 "SourceSansRoman";
|
||||
|
|
52
buildVFs.sh
Executable file → Normal file
52
buildVFs.sh
Executable file → Normal file
|
@ -1,7 +1,5 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
set -e
|
||||
|
||||
ro_name=SourceSansVariable-Roman
|
||||
it_name=SourceSansVariable-Italic
|
||||
|
||||
|
@ -9,54 +7,56 @@ it_name=SourceSansVariable-Italic
|
|||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
|
||||
# clean existing build artifacts
|
||||
var_dir="$DIR"/target/VAR
|
||||
rm -rf "$var_dir"
|
||||
mkdir -p "$var_dir"
|
||||
var_dir=$DIR/target/VAR
|
||||
rm -rf $var_dir
|
||||
mkdir -p $var_dir
|
||||
|
||||
|
||||
function build_var_font {
|
||||
# $1 is Master directory
|
||||
# $2 is font name
|
||||
echo $2
|
||||
|
||||
otf_file="$1"/$2.otf
|
||||
ttf_file="$1"/$2.ttf
|
||||
dsp_file="$1"/$2.designspace
|
||||
|
||||
# build variable OTF
|
||||
buildmasterotfs -d "$dsp_file"
|
||||
buildcff2vf --omit-mac-names -d "$dsp_file"
|
||||
# --mkot gs is for using the makeotf option -gs, which omits glyphs not in the GOADB
|
||||
buildmasterotfs --mkot gs -d $1/$2.designspace
|
||||
buildcff2vf -d $1/$2.designspace
|
||||
|
||||
# extract and subroutinize the CFF2 table
|
||||
echo 'Subroutinizing' $2.otf
|
||||
tx -cff2 +S +b -std "$otf_file" "$1"/.tb_cff2 2> /dev/null
|
||||
tx -cff2 +S +b -std $1/$2.otf $1/.tb_cff2 2> /dev/null
|
||||
|
||||
# replace CFF2 table with subroutinized version
|
||||
sfntedit -a CFF2="$1"/.tb_cff2 "$otf_file"
|
||||
sfntedit -a CFF2=$1/.tb_cff2 $1/$2.otf
|
||||
|
||||
# comment out STAT feature file which cannot be digested by fontmake
|
||||
sed -i '' 's/^/#/' $1/../../STAT.fea
|
||||
|
||||
# build variable TTF
|
||||
fontmake -m "$dsp_file" -o variable --production-names --output-path "$ttf_file" --feature-writer None
|
||||
fontmake -m $1/$2.designspace -o variable --production-names --output-path $1/$2.ttf
|
||||
|
||||
# use DSIG, name, OS/2, hhea, post, STAT, and fvar tables from OTFs
|
||||
sfntedit -x DSIG="$1"/.tb_DSIG,name="$1"/.tb_name,OS/2="$1"/.tb_os2,hhea="$1"/.tb_hhea,post="$1"/.tb_post,STAT="$1"/.tb_STAT,fvar="$1"/.tb_fvar "$otf_file"
|
||||
sfntedit -a DSIG="$1"/.tb_DSIG,name="$1"/.tb_name,OS/2="$1"/.tb_os2,hhea="$1"/.tb_hhea,post="$1"/.tb_post,STAT="$1"/.tb_STAT,fvar="$1"/.tb_fvar "$ttf_file"
|
||||
# use DSIG, name, OS/2, hhea, post, and STAT tables from OTFs
|
||||
sfntedit -x DSIG=$1/.tb_DSIG,name=$1/.tb_name,OS/2=$1/.tb_os2,hhea=$1/.tb_hhea,post=$1/.tb_post,STAT=$1/.tb_STAT $1/$2.otf
|
||||
sfntedit -a DSIG=$1/.tb_DSIG,name=$1/.tb_name,OS/2=$1/.tb_os2,hhea=$1/.tb_hhea,post=$1/.tb_post,STAT=$1/.tb_STAT $1/$2.ttf
|
||||
|
||||
# use cmap, GDEF, GPOS, and GSUB tables from TTFs
|
||||
sfntedit -x cmap="$1"/.tb_cmap,GDEF="$1"/.tb_GDEF,GPOS="$1"/.tb_GPOS,GSUB="$1"/.tb_GSUB "$ttf_file"
|
||||
sfntedit -a cmap="$1"/.tb_cmap,GDEF="$1"/.tb_GDEF,GPOS="$1"/.tb_GPOS,GSUB="$1"/.tb_GSUB "$otf_file"
|
||||
sfntedit -x cmap=$1/.tb_cmap,GDEF=$1/.tb_GDEF,GPOS=$1/.tb_GPOS,GSUB=$1/.tb_GSUB $1/$2.ttf
|
||||
sfntedit -a cmap=$1/.tb_cmap,GDEF=$1/.tb_GDEF,GPOS=$1/.tb_GPOS,GSUB=$1/.tb_GSUB $1/$2.otf
|
||||
|
||||
# move font files to target directory
|
||||
mv "$otf_file" "$var_dir"
|
||||
mv "$ttf_file" "$var_dir"
|
||||
mv $1/$2.otf $var_dir
|
||||
mv $1/$2.ttf $var_dir
|
||||
|
||||
# delete build artifacts
|
||||
rm "$1"/.tb_*
|
||||
rm "$1"/master_*/*.*tf
|
||||
rm $1/.tb_*
|
||||
rm $1/master_*/*.*tf
|
||||
|
||||
# undo changes to STAT feature file
|
||||
sed -i '' 's/#//' $1/../../STAT.fea
|
||||
|
||||
echo "Done with $2"
|
||||
echo ""
|
||||
echo ""
|
||||
}
|
||||
|
||||
build_var_font "$DIR"/Roman/Masters $ro_name
|
||||
build_var_font "$DIR"/Italic/Masters $it_name
|
||||
build_var_font $DIR/Roman/Masters $ro_name
|
||||
build_var_font $DIR/Italic/Masters $it_name
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# inlcuded by SourceSans3/features.fea
|
||||
# inlcuded by /SourceSans3/features.fea
|
||||
# NOTE: For cross-platform consistency, OS/2.TypoAscender and |OS/2.TypoDescender| must add up to the font's UPM value
|
||||
|
||||
TypoAscender 1024; # Must be the same on all fonts for cross-platform consistency
|
||||
|
@ -21,6 +21,8 @@ UnicodeRange 0 # Basic Latin
|
|||
7 # Greek
|
||||
9 # Cyrillic
|
||||
29 # Latin Extended Additional
|
||||
31 # General Punctuation
|
||||
32 # Superscripts and Subscripts
|
||||
30 # Greek Extended
|
||||
33; # Currency Symbols
|
||||
33 # Currency Symbols
|
||||
45; # Geometric Shapes
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# inlcuded by SourceSans3/features.fea
|
||||
# inlcuded by /SourceSans3/features.fea
|
||||
# inlcuded by /SourceSans3/featuresVar.fea
|
||||
|
||||
nameid 0 "\00a9 2010 - 2020 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name \2018Source\2020.";
|
||||
nameid 7 "Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.";
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
# inlcuded by /SourceSans3/featuresVar.fea
|
||||
|
||||
nameid 285 "Roman";
|
||||
nameid 286 "Italic";
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
include (../../../familyTables.fea);
|
||||
include (../STAT.fea);
|
||||
|
||||
table name {
|
||||
include (../nameIDs.fea);
|
||||
|
|
Loading…
Reference in a new issue