mirror of
https://github.com/i-tu/Hasklig.git
synced 2024-09-11 02:25:46 +03:00
Update build scripts
This commit is contained in:
parent
86efd7cc1e
commit
6cc067911f
@ -43,10 +43,8 @@ goto :eof
|
||||
:: %1 - Roman/Italic
|
||||
:: %2 - Weight
|
||||
:build_font
|
||||
call makeotf -f "%~dp0\%1\%2\font.ufo" -r -o "%TARGET_OTF_PATH%\%FAMILY%-%2.otf"
|
||||
call makeotf -f "%~dp0\%1\%2\font.ttf" -r -o "%TARGET_TTF_PATH%\%FAMILY%-%2.ttf"
|
||||
:: remove default options file from the source tree after building
|
||||
del "%~dp0\%1\%2\current.fpr"
|
||||
call makeotf -f "%~dp0\%1\Instances\%2\font.ufo" -r -ci "%~dp0\uvs.txt" -o "%TARGET_OTF_PATH%\%FAMILY%-%2.otf"
|
||||
call makeotf -f "%~dp0\%1\Instances\%2\font.ttf" -r -ci "%~dp0\uvs.txt" -o "%TARGET_TTF_PATH%\%FAMILY%-%2.ttf" -ff "%~dp0\%1\Instances\%2\font.ufo\features.fea"
|
||||
"%PYTHON_PATH%" "%~dp0\addSVGtable.py" "%TARGET_OTF_PATH%\%FAMILY%-%2.otf" "%~dp0\svg"
|
||||
"%PYTHON_PATH%" "%~dp0\addSVGtable.py" "%TARGET_TTF_PATH%\%FAMILY%-%2.ttf" "%~dp0\svg"
|
||||
goto :eof
|
||||
|
14
build.sh
14
build.sh
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
family=SourceCodePro
|
||||
romanWeights='Black Bold ExtraLight Light Medium Regular Semibold'
|
||||
@ -18,18 +18,18 @@ mkdir -p $otfDir $ttfDir
|
||||
|
||||
for w in $romanWeights
|
||||
do
|
||||
makeotf -f Roman/$w/font.ufo -r -ci "$UVS" -o $otfDir/$family-$w.otf
|
||||
makeotf -f Roman/$w/font.ttf -r -ci "$UVS" -o $ttfDir/$family-$w.ttf
|
||||
rm Roman/$w/current.fpr # remove default options file from the source tree after building
|
||||
font_path=Roman/Instances/$w/font
|
||||
makeotf -f $font_path.ufo -r -ci "$UVS" -o $otfDir/$family-$w.otf
|
||||
makeotf -f $font_path.ttf -r -ci "$UVS" -o $ttfDir/$family-$w.ttf -ff $font_path.ufo/features.fea
|
||||
"$addSVG" $otfDir/$family-$w.otf svg
|
||||
"$addSVG" $ttfDir/$family-$w.ttf svg
|
||||
done
|
||||
|
||||
for w in $italicWeights
|
||||
do
|
||||
makeotf -f Italic/$w/font.ufo -r -ci "$UVS" -o $otfDir/$family-$w.otf
|
||||
makeotf -f Italic/$w/font.ttf -r -ci "$UVS" -o $ttfDir/$family-$w.ttf
|
||||
rm Italic/$w/current.fpr # remove default options file from the source tree after building
|
||||
font_path=Italic/Instances/$w/font
|
||||
makeotf -f $font_path.ufo -r -ci "$UVS" -o $otfDir/$family-$w.otf
|
||||
makeotf -f $font_path.ttf -r -ci "$UVS" -o $ttfDir/$family-$w.ttf -ff $font_path.ufo/features.fea
|
||||
"$addSVG" $otfDir/$family-$w.otf svg
|
||||
"$addSVG" $ttfDir/$family-$w.ttf svg
|
||||
done
|
||||
|
36
buildVFs.sh
36
buildVFs.sh
@ -1,8 +1,32 @@
|
||||
buildMasterOTFs RomanMasters/SourceCodePro.designspace
|
||||
buildCFF2VF RomanMasters/SourceCodePro.designspace RomanMasters/SourceCodePro-Variable.otf
|
||||
#!/usr/bin/env sh
|
||||
|
||||
buildMasterOTFs ItalicMasters/SourceCodePro-Italic.designspace
|
||||
buildCFF2VF ItalicMasters/SourceCodePro-Italic.designspace ItalicMasters/SourceCodePro-VariableItalic.otf
|
||||
# path to Python script that adds the SVG table
|
||||
addSVG=$(cd $(dirname "$0") && pwd -P)/addSVGtable.py
|
||||
|
||||
rm *Masters/master_*/current.fpr
|
||||
rm *Masters/master_*/master.otf
|
||||
rom=Roman/Masters
|
||||
itm=Italic/Masters
|
||||
|
||||
ro_name=SourceCodeVariable-Roman
|
||||
it_name=SourceCodeVariable-Italic
|
||||
|
||||
# build variable OTFs
|
||||
buildMasterOTFs $rom/$ro_name.designspace
|
||||
buildCFF2VF $rom/$ro_name.designspace
|
||||
buildMasterOTFs $itm/$it_name.designspace
|
||||
buildCFF2VF $itm/$it_name.designspace
|
||||
|
||||
# extract and subroutinize the CFF2 table
|
||||
tx -cff2 +S +b -std $rom/$ro_name.otf $rom/.tb_cff2
|
||||
tx -cff2 +S +b -std $itm/$it_name.otf $itm/.tb_cff2
|
||||
|
||||
# replace CFF2 table with subroutinized version
|
||||
sfntedit -a CFF2=$rom/.tb_cff2 $rom/$ro_name.otf
|
||||
sfntedit -a CFF2=$itm/.tb_cff2 $itm/$it_name.otf
|
||||
|
||||
# add SVG table to variable OTFs
|
||||
"$addSVG" $rom/$ro_name.otf svg
|
||||
"$addSVG" $itm/$it_name.otf svg
|
||||
|
||||
# delete build artifacts
|
||||
rm */Masters/.tb_*
|
||||
rm */Masters/master_*/*.*tf
|
||||
|
Loading…
Reference in New Issue
Block a user