mirror of
https://github.com/i-tu/Hasklig.git
synced 2024-09-17 13:37:21 +03:00
Update build scripts
This commit is contained in:
parent
86efd7cc1e
commit
6cc067911f
@ -43,10 +43,8 @@ goto :eof
|
|||||||
:: %1 - Roman/Italic
|
:: %1 - Roman/Italic
|
||||||
:: %2 - Weight
|
:: %2 - Weight
|
||||||
:build_font
|
:build_font
|
||||||
call makeotf -f "%~dp0\%1\%2\font.ufo" -r -o "%TARGET_OTF_PATH%\%FAMILY%-%2.otf"
|
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\%2\font.ttf" -r -o "%TARGET_TTF_PATH%\%FAMILY%-%2.ttf"
|
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"
|
||||||
:: remove default options file from the source tree after building
|
|
||||||
del "%~dp0\%1\%2\current.fpr"
|
|
||||||
"%PYTHON_PATH%" "%~dp0\addSVGtable.py" "%TARGET_OTF_PATH%\%FAMILY%-%2.otf" "%~dp0\svg"
|
"%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"
|
"%PYTHON_PATH%" "%~dp0\addSVGtable.py" "%TARGET_TTF_PATH%\%FAMILY%-%2.ttf" "%~dp0\svg"
|
||||||
goto :eof
|
goto :eof
|
||||||
|
14
build.sh
14
build.sh
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
family=SourceCodePro
|
family=SourceCodePro
|
||||||
romanWeights='Black Bold ExtraLight Light Medium Regular Semibold'
|
romanWeights='Black Bold ExtraLight Light Medium Regular Semibold'
|
||||||
@ -18,18 +18,18 @@ mkdir -p $otfDir $ttfDir
|
|||||||
|
|
||||||
for w in $romanWeights
|
for w in $romanWeights
|
||||||
do
|
do
|
||||||
makeotf -f Roman/$w/font.ufo -r -ci "$UVS" -o $otfDir/$family-$w.otf
|
font_path=Roman/Instances/$w/font
|
||||||
makeotf -f Roman/$w/font.ttf -r -ci "$UVS" -o $ttfDir/$family-$w.ttf
|
makeotf -f $font_path.ufo -r -ci "$UVS" -o $otfDir/$family-$w.otf
|
||||||
rm Roman/$w/current.fpr # remove default options file from the source tree after building
|
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" $otfDir/$family-$w.otf svg
|
||||||
"$addSVG" $ttfDir/$family-$w.ttf svg
|
"$addSVG" $ttfDir/$family-$w.ttf svg
|
||||||
done
|
done
|
||||||
|
|
||||||
for w in $italicWeights
|
for w in $italicWeights
|
||||||
do
|
do
|
||||||
makeotf -f Italic/$w/font.ufo -r -ci "$UVS" -o $otfDir/$family-$w.otf
|
font_path=Italic/Instances/$w/font
|
||||||
makeotf -f Italic/$w/font.ttf -r -ci "$UVS" -o $ttfDir/$family-$w.ttf
|
makeotf -f $font_path.ufo -r -ci "$UVS" -o $otfDir/$family-$w.otf
|
||||||
rm Italic/$w/current.fpr # remove default options file from the source tree after building
|
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" $otfDir/$family-$w.otf svg
|
||||||
"$addSVG" $ttfDir/$family-$w.ttf svg
|
"$addSVG" $ttfDir/$family-$w.ttf svg
|
||||||
done
|
done
|
||||||
|
36
buildVFs.sh
36
buildVFs.sh
@ -1,8 +1,32 @@
|
|||||||
buildMasterOTFs RomanMasters/SourceCodePro.designspace
|
#!/usr/bin/env sh
|
||||||
buildCFF2VF RomanMasters/SourceCodePro.designspace RomanMasters/SourceCodePro-Variable.otf
|
|
||||||
|
|
||||||
buildMasterOTFs ItalicMasters/SourceCodePro-Italic.designspace
|
# path to Python script that adds the SVG table
|
||||||
buildCFF2VF ItalicMasters/SourceCodePro-Italic.designspace ItalicMasters/SourceCodePro-VariableItalic.otf
|
addSVG=$(cd $(dirname "$0") && pwd -P)/addSVGtable.py
|
||||||
|
|
||||||
rm *Masters/master_*/current.fpr
|
rom=Roman/Masters
|
||||||
rm *Masters/master_*/master.otf
|
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