Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash 运行用于字体生成的脚本文件_Bash_Shell_Makefile_Fonts - Fatal编程技术网

Bash 运行用于字体生成的脚本文件

Bash 运行用于字体生成的脚本文件,bash,shell,makefile,fonts,Bash,Shell,Makefile,Fonts,在EB Garamond github中有一个makefile,用来生成Garamond字体文件。以下是文件的第一行: NAME=EBGaramond VERSION=0.016 SRC=SFD BLD=build WEB=web SPEC=specimen PACK=$(NAME)-$(VERSION) WPCK=$(NAME)-$(VERSION)-web DIST=$(NAME)-$(VERSION)-complete #Call script through fontforge, n

在EB Garamond github中有一个makefile,用来生成Garamond字体文件。以下是文件的第一行:

NAME=EBGaramond
VERSION=0.016

SRC=SFD
BLD=build
WEB=web
SPEC=specimen
PACK=$(NAME)-$(VERSION)
WPCK=$(NAME)-$(VERSION)-web
DIST=$(NAME)-$(VERSION)-complete

#Call script through fontforge, not python. https://github.com/fontforge/fontforge/issues/528
FF=fontforge
#Return to python because we don’t scale the font any longer.
PYTHON?=python
SCRIPT=tools/makefont.py

#SIZES=08 12
#STYLES=Regular SC Allsc Italic Bold
#SPECIAL=Initials InitialsF1 InitialsF2
FONTS=08-Regular 08-Italic 12-Regular SC12-Regular 12-AllSC 12-Italic  -Initials -InitialsF1 -InitialsF2 SC08-Regular # SC12-Italic 12-Bold

SFD=$(FONTS:%=$(SRC)/$(NAME)%.sfdir)
OTF=$(FONTS:%=$(BLD)/$(NAME)%.otf)
TTF=$(FONTS:%=$(BLD)/$(NAME)%.ttf)
WOF=$(FONTS:%=$(WEB)/$(NAME)%.woff)
PDF=$(FONTS:%=$(SPEC)/$(NAME)%-Glyphs.pdf)

all: otf ttf webfonts # pdfs
pack: dpack wpack

otf: $(OTF)
ttf: $(TTF)
webfonts: $(WOF)
pdfs: $(PDF)

$(BLD):
    @mkdir $@
$(WEB):
    @mkdir -p $@
$(SPEC):
    @mkdir -p $@

$(BLD)/%.otf: $(SRC)/%.sfdir Makefile $(SCRIPT) | $(BLD)
    @echo "Generating   $@"
    @$(PYTHON) $(SCRIPT) $< $@ $(VERSION)

NAME=EBGaramond
版本=0.016
SRC=SFD
BLD=构建
网络
规格=试样
包=$(名称)-$(版本)
WPCK=$(名称)-$(版本)-网络
DIST=$(名称)-(版本)-完成
#通过fontforge而不是python调用脚本。https://github.com/fontforge/fontforge/issues/528
FF=fontforge
#返回python,因为我们不再缩放字体。
PYTHON?=PYTHON
SCRIPT=tools/makefont.py
#尺寸=08 12
#样式=常规SC Allsc斜体加粗
#特殊=首字母缩写缩写SF1首字母缩写SF2
FONTS=08常规08斜体12常规SC12常规12所有SC 12斜体-首字母-首字母1-首字母SC2常规SC08斜体12粗体
SFD=$(字体:%=$(SRC)/$(名称)%.sfdir)
OTF=$(字体:%=$(BLD)/$(名称)%.OTF)
TTF=$(字体:%=$(BLD)/$(名称)%.TTF)
WOF=$(字体:%=$(网页)/$(名称)%.woff)
PDF=$(字体:%=$(规范)/$(名称)%-Glyphs.PDF)
全部:otf ttf webfonts#PDF
包装:dpack wpack
otf:$(otf)
ttf:$(ttf)
webfonts:$(WOF)
PDF:$(PDF)
美元(BLD):
@mkdir$@
$(网络):
@mkdir-p$@
$(规格):
@mkdir-p$@
$(BLD)/%.otf:$(SRC)/%.sfdir生成文件$(脚本)|$(BLD)
@回显“正在生成$@”
@$(PYTHON)$(脚本)$<$@$(版本)

我应该如何运行它?我不知道它是什么脚本语言。我尝试使用python和fontforge,但他们似乎无法识别该文件。

只需确保您的系统上安装了一个版本的
make
命令行实用程序,然后运行
make

这是一个
makefile
——您已经将其标记为该文件。只需在包含该文件的目录中运行
make
。@G.M.谢谢!对不起,我问了个愚蠢的问题