-
Notifications
You must be signed in to change notification settings - Fork 1
/
GNUmakefile
207 lines (161 loc) · 7.03 KB
/
GNUmakefile
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# Copyright 2015-2016 by
# Werner Lemberg <wl@gnu.org>.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain a
# copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# Possible targets:
#
# ttf Generate TrueType files with ttfautohint.
# html Generate HTML pages (this also needs generated TTF files).
# png Generate PNG images from HTML pages via browserstack.
#
# all Make `ttf', `html', and `png' targets. Note that target `all'
# makes only sense if the files generated by `html' are immediately
# available from the web so that browserstack can access them.
# Otherwise, you have to call target `html', upload the created
# files to a suitable host – with the default setup below this
# simply means committing the new files to the repository –, then
# finishing with target `png'.
include rules.mk
# The following programs are expected to be in $PATH.
#
# cat
# convert (from the ImageMagick package)
# curl
# date
# mkdir
# pamcut, pamcomp, pngtopnm, pnmtopng, pnmcrop (from the netpbm package)
# rm
# sed
# The name assigned in links to the repository's top-level `index.html'
# file.
#
TOP ?= Noto
# The directory where the unhinted fonts reside.
#
UNHINTED_FONT_DIR ?= ../noto-fonts/unhinted
# A URL to access the unhinted fonts.
#
UNHINTED_FONT_URL ?= https://rawgit.com/googlei18n/noto-fonts/master/unhinted
# The directory where the manually hinted fonts reside. If there is no
# manually hinted version of a font, it gets ignored.
#
HINTED_FONT_DIR ?= ../noto-fonts/hinted
# A URL to access the manually hinted fonts.
#
HINTED_FONT_URL ?= https://rawgit.com/googlei18n/noto-fonts/master/hinted
# The directory where the sample texts are stored. The name of the files
# must be of the form `<lang>-<script>_$(SAMPLE_TEXT_SUFFIX)', where <lang>
# is a two-letter or three-letter tag (given as the fourth argument to the
# `FontFamily' macro below) and <script> a four-letter tag (the third
# argument).
#
# Example: `ar-Arab_uhdr.txt'.
#
SAMPLE_TEXT_DIR ?= ../nototools/sample_texts
SAMPLE_TEXT_SUFFIX ?= udhr.txt
# The ttfautohint binary.
#
TTFAUTOHINT ?= ../ttfautohint/frontend/ttfautohint
# ttfautohint flags (except `-F', `-R', and `-w', which we add separately).
#
TTFAUTOHINT_FLAGS ?= -t
# A font for labeling PNG images with ImageMagick's `convert' program.
#
LABEL_FONT ?= Times-Roman
# The ftdump binary, a FreeType demo program. We use it to extract a font's
# version string from its `name' table.
#
FTDUMP ?= ftdump
# The URL prefix to access HTML pages for the repository we are going to
# fill with created files. Note that directly accessing `github.com'
# doesn't work since HTML pages (intentionally) get a `Content-Type' of
# `text/plain'.
#
RAWGIT ?= https://rawgit.com/lemzwerg/noto-hinted/master
# A program to access the browserstack API on the command line. We are
# using a Ruby gem called `screenshooter'; see
#
# https://github.com/bennylope/screenshooter
#
# for more.
#
SCREENSHOOTER ?= screenshooter.ruby2.1
# Hinting modes for ttfautohint. This sets ttfautohint option `-w'. The
# modes are also added as a suffix to both the output font name (ttfautohint
# option `-F') and the output font's file name (via Makefile rules).
#
# `G' means strong hinting for GDI ClearType only, `gGD' indicates strong
# hinting for all hinting modes (grayscale, GDI, and DWrite ClearType).
#
# Two values are special: `manual' and `unhinted'. They are not options for
# ttfautohint; instead, they refer to already existing fonts located in the
# directories given by `HINTED_FONT_DIR' and `UNHINTED_FONT_DIR',
# respectively.
#
# This Makefile generates separate HTML test pages for each value in
# `HINTING_MODES'.
#
HINTING_MODES ?= unhinted manual G gGD
# The browsers, as set up in the `*.yaml' files, which are also used by
# browserstack for `*.png' snapshot file names.
#
# Note that IE 11 on Win 8.1, as provided by browserstack, has a bug that
# prevents usage of cross-site web fonts. In other words, `unhinted' and
# `manual' hinting modes usually show Windows system fonts instead of the
# ones linked from `UNHINTED_FONT_URL' and `HINTED_FONT_URL'.
#
BROWSERS ?= win8.1_ie_11.0 \
win8.1_firefox_37.0 \
win8.1_chrome_42.0
# Add new fonts here.
#
$(call FontFamily, NotoSans, Regular Bold Italic BoldItalic, Latn, en cs vi)
$(call FontFamily, NotoSerif, Regular Bold Italic BoldItalic, Latn, en cs vi)
$(call FontFamily, NotoNaskhArabic, Regular Bold, Arab, ar fa)
$(call FontFamily, NotoNastaliqUrdu, Regular, Arab, ur)
$(call FontFamily, NotoSansArmenian, Regular Bold, Armn, hy)
$(call FontFamily, NotoSerifArmenian, Regular Bold, Armn, hy)
$(call FontFamily, NotoSansBengali, Regular Bold, Beng, bn)
$(call FontFamily, NotoSerifBengali, Regular Bold, Beng, bn)
$(call FontFamily, NotoSansCanadianAboriginal, Regular, Cans, iu oj)
$(call FontFamily, NotoSansCherokee, Regular, Cher, chr)
$(call FontFamily, NotoSansDevanagari, Regular Bold, Deva, hi)
$(call FontFamily, NotoSansEthiopic, Regular Bold, Ethi, am)
$(call FontFamily, NotoSansGeorgian, Regular Bold, Geor, ka)
$(call FontFamily, NotoSerifGeorgian, Regular Bold, Geor, ka)
$(call FontFamily, NotoSansGujarati, Regular Bold, Gujr, gu)
$(call FontFamily, NotoSerifGujarati, Regular Bold, Gujr, gu)
$(call FontFamily, NotoSansGurmukhi, Regular Bold, Guru, pa)
$(call FontFamily, NotoSansHebrew, Regular Bold, Hebr, he yi)
$(call FontFamily, NotoSansKannada, Regular Bold, Knda, kn)
$(call FontFamily, NotoSerifKannada, Regular Bold, Knda, kn)
$(call FontFamily, NotoSansKhmer, Regular Bold, Khmr, km)
$(call FontFamily, NotoSerifKhmer, Regular Bold, Khmr, km)
$(call FontFamily, NotoSansLao, Regular Bold, Laoo, lo)
$(call FontFamily, NotoSerifLao, Regular Bold, Laoo, lo)
$(call FontFamily, NotoSansMalayalam, Regular Bold, Mlym, ml)
$(call FontFamily, NotoSerifMalayalam, Regular Bold, Mlym, ml)
$(call FontFamily, NotoSansMyanmar, Regular Bold, Mymr, my)
$(call FontFamily, NotoSansSinhala, Regular Bold, Sinh, si)
$(call FontFamily, NotoSansTamil, Regular Bold, Taml, ta)
$(call FontFamily, NotoSerifTamil, Regular Bold, Taml, ta)
$(call FontFamily, NotoSansTelugu, Regular Bold, Telu, te)
$(call FontFamily, NotoSerifTelugu, Regular Bold, Telu, te)
$(call FontFamily, NotoSansThai, Regular Bold, Thai, th)
$(call FontFamily, NotoSerifThai, Regular Bold, Thai, th)
$(call FontFamily, NotoSansTifinagh, Regular, Tfng, zgh)
$(call FontFamily, NotoSansVai, Regular, Vaii, vai)
# This macro generates the top-level targets.
#
$(GenerateTargets)
# eof