• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2013 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15NOTO_DIR := $(call my-dir)
16
17include $(call all-makefiles-under,$(NOTO_DIR))
18
19# We have to use BUILD_PREBUILT instead of PRODUCT_COPY_FILES,
20# to copy over the NOTICE file.
21#############################################################################
22# $(1): The source file name in LOCAL_PATH.
23#       It also serves as the module name and the dest file name.
24#############################################################################
25define build-one-font-module
26$(eval include $(CLEAR_VARS))\
27$(eval LOCAL_MODULE := $(1))\
28$(eval LOCAL_SRC_FILES := $(1))\
29$(eval LOCAL_MODULE_CLASS := ETC)\
30$(eval LOCAL_MODULE_TAGS := optional)\
31$(eval LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts)\
32$(eval include $(BUILD_PREBUILT))
33endef
34
35
36#############################################################################
37# First "build" the Noto CJK fonts, which have a different directory and
38# copyright holder. These are not included in MINIMAL_FONT_FOOTPRINT builds.
39#############################################################################
40ifneq ($(MINIMAL_FONT_FOOTPRINT),true)
41LOCAL_PATH := $(NOTO_DIR)/cjk
42
43font_src_files := \
44    NotoSansCJK-Regular.ttc
45
46$(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))
47font_src_files :=
48
49endif # !MINIMAL_FONT_FOOTPRINT
50
51#############################################################################
52# Similary "build" the Noto CJK fonts for serif family.
53# These are not included in SMALLER_FONT_FOOTPRINT builds.
54#############################################################################
55ifeq ($(filter true,$(EXCLUDE_SERIF_FONTS) $(SMALLER_FONT_FOOTPRINT)),)
56LOCAL_PATH := $(NOTO_DIR)/cjk
57
58font_src_files := \
59    NotoSerifCJK-Regular.ttc
60
61$(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))
62font_src_files :=
63
64endif # !EXCLUDE_SERIF_FONTS && !SMALLER_FONT_FOOTPRINT
65
66#############################################################################
67# Now "build" the Noto Color Emoji font, which is in its own directory. It is
68# not included in the MINIMAL_FONT_FOOTPRINT builds.
69#############################################################################
70ifneq ($(MINIMAL_FONT_FOOTPRINT),true)
71LOCAL_PATH := $(NOTO_DIR)/emoji
72
73font_src_files := \
74    NotoColorEmoji.ttf
75
76$(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))
77font_src_files :=
78
79endif # !MINIMAL_FONT_FOOTPRINT
80
81#############################################################################
82# Now "build" the rest of the fonts, which live in a separate subdirectory.
83#############################################################################
84LOCAL_PATH := $(NOTO_DIR)/other
85
86#############################################################################
87# The following fonts are included in all builds.
88#############################################################################
89font_src_files := \
90    NotoSerif-Regular.ttf \
91    NotoSerif-Bold.ttf \
92    NotoSerif-Italic.ttf \
93    NotoSerif-BoldItalic.ttf
94
95#############################################################################
96# The following fonts are excluded from SMALLER_FONT_FOOTPRINT builds.
97#############################################################################
98ifneq ($(SMALLER_FONT_FOOTPRINT),true)
99font_src_files += \
100    NotoSansAdlam-Regular.ttf \
101    NotoSansAhom-Regular.otf \
102    NotoSansAnatolianHieroglyphs-Regular.otf \
103    NotoSansAvestan-Regular.ttf \
104    NotoSansBalinese-Regular.ttf \
105    NotoSansBamum-Regular.ttf \
106    NotoSansBassaVah-Regular.otf \
107    NotoSansBatak-Regular.ttf \
108    NotoSansBengali-Bold.otf \
109    NotoSansBengali-Medium.otf \
110    NotoSansBengali-Regular.otf \
111    NotoSansBengaliUI-Bold.otf \
112    NotoSansBengaliUI-Medium.otf \
113    NotoSansBengaliUI-Regular.otf \
114    NotoSansBhaiksuki-Regular.otf \
115    NotoSansBrahmi-Regular.ttf \
116    NotoSansBuginese-Regular.ttf \
117    NotoSansBuhid-Regular.ttf \
118    NotoSansCanadianAboriginal-Regular.ttf \
119    NotoSansCarian-Regular.ttf \
120    NotoSansChakma-Regular.otf \
121    NotoSansCham-Bold.ttf \
122    NotoSansCham-Regular.ttf \
123    NotoSansCherokee-Regular.ttf \
124    NotoSansCoptic-Regular.ttf \
125    NotoSansCuneiform-Regular.ttf \
126    NotoSansCypriot-Regular.ttf \
127    NotoSansDeseret-Regular.ttf \
128    NotoSansEgyptianHieroglyphs-Regular.ttf \
129    NotoSansElbasan-Regular.otf \
130    NotoSansEthiopic-Bold.ttf \
131    NotoSansEthiopic-Regular.ttf \
132    NotoSansGlagolitic-Regular.ttf \
133    NotoSansGothic-Regular.ttf \
134    NotoSansGujarati-Bold.ttf \
135    NotoSansGujarati-Regular.ttf \
136    NotoSansGujaratiUI-Bold.ttf \
137    NotoSansGujaratiUI-Regular.ttf \
138    NotoSansGurmukhi-Bold.ttf \
139    NotoSansGurmukhi-Regular.ttf \
140    NotoSansGurmukhiUI-Bold.ttf \
141    NotoSansGurmukhiUI-Regular.ttf \
142    NotoSansHanunoo-Regular.ttf \
143    NotoSansHatran-Regular.otf \
144    NotoSansImperialAramaic-Regular.ttf \
145    NotoSansInscriptionalPahlavi-Regular.ttf \
146    NotoSansInscriptionalParthian-Regular.ttf \
147    NotoSansJavanese-Regular.ttf \
148    NotoSansKaithi-Regular.ttf \
149    NotoSansKannada-Bold.ttf \
150    NotoSansKannada-Regular.ttf \
151    NotoSansKannadaUI-Bold.ttf \
152    NotoSansKannadaUI-Regular.ttf \
153    NotoSansKayahLi-Regular.ttf \
154    NotoSansKharoshthi-Regular.ttf \
155    NotoSansKhmerUI-Bold.ttf \
156    NotoSansKhmerUI-Regular.ttf \
157    NotoSansLao-Bold.ttf \
158    NotoSansLao-Regular.ttf \
159    NotoSansLaoUI-Bold.ttf \
160    NotoSansLaoUI-Regular.ttf \
161    NotoSansLepcha-Regular.ttf \
162    NotoSansLimbu-Regular.ttf \
163    NotoSansLinearA-Regular.otf \
164    NotoSansLinearB-Regular.ttf \
165    NotoSansLisu-Regular.ttf \
166    NotoSansLycian-Regular.ttf \
167    NotoSansLydian-Regular.ttf \
168    NotoSansMalayalam-Bold.otf \
169    NotoSansMalayalam-Medium.otf \
170    NotoSansMalayalam-Regular.otf \
171    NotoSansMalayalamUI-Bold.otf \
172    NotoSansMalayalamUI-Medium.otf \
173    NotoSansMalayalamUI-Regular.otf \
174    NotoSansMandaic-Regular.ttf \
175    NotoSansManichaean-Regular.otf \
176    NotoSansMarchen-Regular.otf \
177    NotoSansMeeteiMayek-Regular.ttf \
178    NotoSansMeroitic-Regular.otf \
179    NotoSansMiao-Regular.otf \
180    NotoSansMongolian-Regular.ttf \
181    NotoSansMro-Regular.otf \
182    NotoSansMultani-Regular.otf \
183    NotoSansMyanmar-Bold-ZawDecode.ttf \
184    NotoSansMyanmar-Regular-ZawDecode.ttf \
185    NotoSansMyanmarUI-Bold-ZawDecode.ttf \
186    NotoSansMyanmarUI-Regular-ZawDecode.ttf \
187    NotoSansNabataean-Regular.otf \
188    NotoSansNewa-Regular.otf \
189    NotoSansNewTaiLue-Regular.ttf \
190    NotoSansNKo-Regular.ttf \
191    NotoSansOgham-Regular.ttf \
192    NotoSansOlChiki-Regular.ttf \
193    NotoSansOldItalic-Regular.ttf \
194    NotoSansOldNorthArabian-Regular.otf \
195    NotoSansOldPermic-Regular.otf \
196    NotoSansOldPersian-Regular.ttf \
197    NotoSansOldSouthArabian-Regular.ttf \
198    NotoSansOldTurkic-Regular.ttf \
199    NotoSansOriya-Bold.ttf \
200    NotoSansOriya-Regular.ttf \
201    NotoSansOriyaUI-Bold.ttf \
202    NotoSansOriyaUI-Regular.ttf \
203    NotoSansOsage-Regular.ttf \
204    NotoSansOsmanya-Regular.ttf \
205    NotoSansPahawhHmong-Regular.otf \
206    NotoSansPalmyrene-Regular.otf \
207    NotoSansPauCinHau-Regular.otf \
208    NotoSansPhagsPa-Regular.ttf \
209    NotoSansPhoenician-Regular.ttf \
210    NotoSansRejang-Regular.ttf \
211    NotoSansRunic-Regular.ttf \
212    NotoSansSamaritan-Regular.ttf \
213    NotoSansSaurashtra-Regular.ttf \
214    NotoSansSharada-Regular.otf \
215    NotoSansShavian-Regular.ttf \
216    NotoSansSinhala-Bold.otf \
217    NotoSansSinhala-Medium.otf \
218    NotoSansSinhala-Regular.otf \
219    NotoSansSinhalaUI-Bold.otf \
220    NotoSansSinhalaUI-Medium.otf \
221    NotoSansSinhalaUI-Regular.otf \
222    NotoSansSoraSompeng-Regular.otf \
223    NotoSansSundanese-Regular.ttf \
224    NotoSansSylotiNagri-Regular.ttf \
225    NotoSansSyriacEastern-Regular.ttf \
226    NotoSansSyriacEstrangela-Regular.ttf \
227    NotoSansSyriacWestern-Regular.ttf \
228    NotoSansTagalog-Regular.ttf \
229    NotoSansTagbanwa-Regular.ttf \
230    NotoSansTaiLe-Regular.ttf \
231    NotoSansTaiTham-Regular.ttf \
232    NotoSansTaiViet-Regular.ttf \
233    NotoSansTamil-Bold.otf \
234    NotoSansTamil-Medium.otf \
235    NotoSansTamil-Regular.otf \
236    NotoSansTamilUI-Bold.otf \
237    NotoSansTamilUI-Medium.otf \
238    NotoSansTamilUI-Regular.otf \
239    NotoSansTelugu-Bold.ttf \
240    NotoSansTelugu-Regular.ttf \
241    NotoSansTeluguUI-Bold.ttf \
242    NotoSansTeluguUI-Regular.ttf \
243    NotoSansThaana-Bold.ttf \
244    NotoSansThaana-Regular.ttf \
245    NotoSansTibetan-Bold.ttf \
246    NotoSansTibetan-Regular.ttf \
247    NotoSansTifinagh-Regular.ttf \
248    NotoSansUgaritic-Regular.ttf \
249    NotoSansVai-Regular.ttf \
250    NotoSansYi-Regular.ttf
251endif # !SMALLER_FONT_FOOTPRINT
252
253#############################################################################
254# The following fonts are excluded from MINIMAL_FONT_FOOTPRINT builds.
255#############################################################################
256ifneq ($(MINIMAL_FONT_FOOTPRINT),true)
257font_src_files += \
258    NotoNaskhArabic-Regular.ttf \
259    NotoNaskhArabic-Bold.ttf \
260    NotoNaskhArabicUI-Regular.ttf \
261    NotoNaskhArabicUI-Bold.ttf \
262    NotoSansArmenian-Regular.otf \
263    NotoSansArmenian-Bold.otf \
264    NotoSansArmenian-Medium.otf \
265    NotoSansDevanagari-Regular.otf \
266    NotoSansDevanagari-Bold.otf \
267    NotoSansDevanagari-Medium.otf \
268    NotoSansDevanagariUI-Regular.otf \
269    NotoSansDevanagariUI-Bold.otf \
270    NotoSansDevanagariUI-Medium.otf \
271    NotoSansGeorgian-Regular.otf \
272    NotoSansGeorgian-Bold.otf \
273    NotoSansGeorgian-Medium.otf \
274    NotoSansHebrew-Regular.ttf \
275    NotoSansHebrew-Bold.ttf \
276    NotoSansSymbols-Regular-Subsetted.ttf \
277    NotoSansSymbols-Regular-Subsetted2.ttf \
278    NotoSansThai-Regular.ttf \
279    NotoSansThai-Bold.ttf \
280    NotoSansThaiUI-Regular.ttf \
281    NotoSansThaiUI-Bold.ttf
282endif # !MINIMAL_FONT_FOOTPRINT
283
284ifeq ($(filter true,$(EXCLUDE_SERIF_FONTS) $(SMALLER_FONT_FOOTPRINT)),)
285font_src_files += \
286    NotoSerifArmenian-Bold.otf \
287    NotoSerifArmenian-Regular.otf \
288    NotoSerifBengali-Bold.ttf \
289    NotoSerifBengali-Regular.ttf \
290    NotoSerifDevanagari-Bold.ttf \
291    NotoSerifDevanagari-Regular.ttf \
292    NotoSerifEthiopic-Bold.otf \
293    NotoSerifEthiopic-Regular.otf \
294    NotoSerifGeorgian-Bold.otf \
295    NotoSerifGeorgian-Regular.otf \
296    NotoSerifGujarati-Bold.ttf \
297    NotoSerifGujarati-Regular.ttf \
298    NotoSerifGurmukhi-Bold.otf \
299    NotoSerifGurmukhi-Regular.otf \
300    NotoSerifHebrew-Bold.ttf \
301    NotoSerifHebrew-Regular.ttf \
302    NotoSerifKannada-Bold.ttf \
303    NotoSerifKannada-Regular.ttf \
304    NotoSerifKhmer-Bold.otf \
305    NotoSerifKhmer-Regular.otf \
306    NotoSerifLao-Bold.ttf \
307    NotoSerifLao-Regular.ttf \
308    NotoSerifMalayalam-Bold.ttf \
309    NotoSerifMalayalam-Regular.ttf \
310    NotoSerifMyanmar-Bold.otf \
311    NotoSerifMyanmar-Regular.otf \
312    NotoSerifSinhala-Bold.otf \
313    NotoSerifSinhala-Regular.otf \
314    NotoSerifTamil-Bold.otf \
315    NotoSerifTamil-Regular.otf \
316    NotoSerifTelugu-Bold.ttf \
317    NotoSerifTelugu-Regular.ttf \
318    NotoSerifThai-Bold.ttf \
319    NotoSerifThai-Regular.ttf
320endif # !EXCLUDE_SERIF_FONTS && !SMALLER_FONT_FOOTPRINT
321
322$(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))
323
324#############################################################################
325# Now "build" the variable fonts, which live in a separate subdirectory.
326# The only variable fonts are for Khmer Sans, which is excluded in
327# SMALLER_FONT_FOOTPRINT build.
328#############################################################################
329
330ifneq ($(SMALLER_FONT_FOOTPRINT),true)
331
332LOCAL_PATH := $(NOTO_DIR)/other-vf
333
334font_src_files := \
335    NotoSansKhmer-VF.ttf
336
337$(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))
338
339endif # !SMALLER_FONT_FOOTPRINT
340
341NOTO_DIR :=
342build-one-font-module :=
343font_src_files :=
344
345
346
347
348