-
Notifications
You must be signed in to change notification settings - Fork 203
/
Copy pathbuild.bat
43 lines (35 loc) · 841 Bytes
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@echo off
setlocal
if not exist .\build\* mkdir build
set flags=
if "%1"=="--italics-hack-off" (
set flags=%1
shift
)
rem only build passed in font
if not "%1"=="" (
call :build_font %1 %flags%
exit /b
)
rem build all fonts
for /d %%d in (.\ligature\*) do call :build_font %%~nd %flags%
exit /b
:build_font
set lig=%1
set flags=%2
set otf=%lig:Lig-=-%
if not exist .\original\%otf%.otf exit /b
if not exist .\ligature\%lig%\glyphs\* exit /b
@echo Building %lig%
ttx -f .\original\%otf%.otf
node index.js %otf% %flags%
ttx -f .\build\%lig%.ttx
rem check if "SSm" is in name since the features are slightly different
@echo.%lig% | findstr /C:"SSm" 1>nul
if errorlevel 1 (
set fea=".\features\default.fea"
) else (
set fea=".\features\defaultSSm.fea"
)
fonttools feaLib -v -o ".\build\%lig%.otf" %fea% ".\build\%lig%.otf"
exit /b