• Home
  • 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
15# We have to use BUILD_PREBUILT instead of PRODUCT_COPY_FIES,
16# to copy over the NOTICE file.
17
18LOCAL_PATH := $(call my-dir)
19font_src_files :=
20
21#############################################################################
22# The following fonts are included in all builds
23#############################################################################
24font_src_files += \
25    NotoSerif-Regular.ttf \
26    NotoSerif-Bold.ttf \
27    NotoSerif-Italic.ttf \
28    NotoSerif-BoldItalic.ttf
29
30#############################################################################
31# The following fonts are only included in EXTENDED_FONT_FOOTPRINT builds
32#############################################################################
33ifeq ($(EXTENDED_FONT_FOOTPRINT),true)
34font_src_files += \
35    NotoSansBalinese-Regular.ttf \
36    NotoSansBatak-Regular.ttf \
37    NotoSansBuginese-Regular.ttf \
38    NotoSansBuhid-Regular.ttf \
39    NotoSansCanadianAboriginal-Regular.ttf \
40    NotoSansCham-Regular.ttf \
41    NotoSansCham-Bold.ttf \
42    NotoSansCherokee-Regular.ttf \
43    NotoSansCoptic-Regular.ttf \
44    NotoSansGlagolitic-Regular.ttf \
45    NotoSansGujarati-Regular.ttf \
46    NotoSansGujarati-Bold.ttf \
47    NotoSansGujaratiUI-Regular.ttf \
48    NotoSansGujaratiUI-Bold.ttf \
49    NotoSansGurmukhi-Regular.ttf \
50    NotoSansGurmukhi-Bold.ttf \
51    NotoSansGurmukhiUI-Regular.ttf \
52    NotoSansGurmukhiUI-Bold.ttf \
53    NotoSansHans-Regular.otf \
54    NotoSansHant-Regular.otf \
55    NotoSansHanunoo-Regular.ttf \
56    NotoSansJavanese-Regular.ttf \
57    NotoSansKayahLi-Regular.ttf \
58    NotoSansKR-Regular.otf \
59    NotoSansLepcha-Regular.ttf \
60    NotoSansLimbu-Regular.ttf \
61    NotoSansMeeteiMayek-Regular.ttf \
62    NotoSansOlChiki-Regular.ttf \
63    NotoSansRejang-Regular.ttf \
64    NotoSansSaurashtra-Regular.ttf \
65    NotoSansSundanese-Regular.ttf \
66    NotoSansSinhala-Regular.ttf \
67    NotoSansSinhala-Bold.ttf \
68    NotoSansSylotiNagri-Regular.ttf \
69    NotoSansTagbanwa-Regular.ttf \
70    NotoSansTaiLe-Regular.ttf \
71    NotoSansTaiTham-Regular.ttf \
72    NotoSansTaiViet-Regular.ttf \
73    NotoSansThaana-Regular.ttf \
74    NotoSansThaana-Bold.ttf \
75    NotoSansTifinagh-Regular.ttf \
76    NotoSansYi-Regular.ttf
77endif # EXTENDED_FONT_FOOTPRINT
78
79
80
81#############################################################################
82# The following fonts are excluded from SMALLER_FONT_FOOTPRINT builds
83#############################################################################
84ifneq ($(SMALLER_FONT_FOOTPRINT),true)
85font_src_files += \
86    NotoSansBengali-Regular.ttf \
87    NotoSansBengali-Bold.ttf \
88    NotoSansBengaliUI-Regular.ttf \
89    NotoSansBengaliUI-Bold.ttf \
90    NotoSansDevanagari-Regular.ttf \
91    NotoSansDevanagari-Bold.ttf \
92    NotoSansDevanagariUI-Regular.ttf \
93    NotoSansDevanagariUI-Bold.ttf \
94    NotoSansEthiopic-Regular.ttf \
95    NotoSansEthiopic-Bold.ttf \
96    NotoSansKannada-Regular.ttf \
97    NotoSansKannada-Bold.ttf \
98    NotoSansKannadaUI-Regular.ttf \
99    NotoSansKannadaUI-Bold.ttf \
100    NotoSansKhmer-Regular.ttf \
101    NotoSansKhmer-Bold.ttf \
102    NotoSansKhmerUI-Regular.ttf \
103    NotoSansKhmerUI-Bold.ttf \
104    NotoSansLao-Regular.ttf \
105    NotoSansLao-Bold.ttf \
106    NotoSansLaoUI-Regular.ttf \
107    NotoSansLaoUI-Bold.ttf \
108    NotoSansMalayalam-Regular.ttf \
109    NotoSansMalayalam-Bold.ttf \
110    NotoSansMalayalamUI-Regular.ttf \
111    NotoSansMalayalamUI-Bold.ttf \
112    NotoSansMyanmar-Regular.ttf \
113    NotoSansMyanmar-Bold.ttf \
114    NotoSansMyanmarUI-Regular.ttf \
115    NotoSansMyanmarUI-Bold.ttf \
116    NotoSansTamil-Regular.ttf \
117    NotoSansTamil-Bold.ttf \
118    NotoSansTamilUI-Regular.ttf \
119    NotoSansTamilUI-Bold.ttf \
120    NotoSansTelugu-Regular.ttf \
121    NotoSansTelugu-Bold.ttf \
122    NotoSansTeluguUI-Regular.ttf \
123    NotoSansTeluguUI-Bold.ttf \
124    NotoSansThai-Regular.ttf \
125    NotoSansThai-Bold.ttf \
126    NotoSansThaiUI-Regular.ttf \
127    NotoSansThaiUI-Bold.ttf
128endif # !SMALLER_FONT_FOOTPRINT
129
130#############################################################################
131# The following fonts are excluded from MINIMAL_FONT_FOOTPRINT builds
132#############################################################################
133ifneq ($(MINIMAL_FONT_FOOTPRINT),true)
134font_src_files += \
135    NotoNaskh-Regular.ttf \
136    NotoNaskh-Bold.ttf \
137    NotoNaskhUI-Regular.ttf \
138    NotoNaskhUI-Bold.ttf \
139    NotoSansArmenian-Regular.ttf \
140    NotoSansArmenian-Bold.ttf \
141    NotoSansGeorgian-Regular.ttf \
142    NotoSansGeorgian-Bold.ttf \
143    NotoSansHebrew-Regular.ttf \
144    NotoSansHebrew-Bold.ttf
145endif # !MINIMAL_FONT_FOOTPRINT
146
147#############################################################################
148# $(1): The source file name in LOCAL_PATH.
149#       It also serves as the module name and the dest file name.
150#############################################################################
151define build-one-font-module
152$(eval include $(CLEAR_VARS))\
153$(eval LOCAL_MODULE := $(1))\
154$(eval LOCAL_SRC_FILES := $(1))\
155$(eval LOCAL_MODULE_CLASS := ETC)\
156$(eval LOCAL_MODULE_TAGS := optional)\
157$(eval LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts)\
158$(eval include $(BUILD_PREBUILT))
159endef
160
161$(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))
162build-one-font-module :=
163font_src_files :=
164
165#############################################################################
166# Use a larger subset of Noto Sans Symbols on EXTENDED_FONT_FOOTPRINT
167# builds, but a smaller subset on other devices.
168#############################################################################
169
170ifeq ($(EXTENDED_FONT_FOOTPRINT),true)
171noto_symbols_src := NotoSansSymbols-Regular-Subsetted-Extended.ttf
172else  # !EXTENDED_FONT_FOOTPRINT
173noto_symbols_src := NotoSansSymbols-Regular-Subsetted.ttf
174endif # EXTENDED_FONT_FOOTPRINT
175
176include $(CLEAR_VARS)
177LOCAL_MODULE := NotoSansSymbols-Regular-Subsetted.ttf
178LOCAL_SRC_FILES := $(noto_symbols_src)
179LOCAL_MODULE_CLASS := ETC
180LOCAL_MODULE_TAGS := optional
181LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts
182include $(BUILD_PREBUILT)
183
184noto_symbols_src :=
185
186#############################################################################
187# Use Noto Color Emoji with all the flags on EXTENDED_FONT_FOOTPRINT builds,
188# but without it on other builds. On SMALLER_FONT_FOOTPRINT devices, no
189# color emoji font is included.
190#############################################################################
191
192ifneq ($(SMALLER_FONT_FOOTPRINT),true)
193
194ifeq ($(EXTENDED_FONT_FOOTPRINT),true)
195color_emoji_src := NotoColorEmoji.ttf
196else  # !EXTENDED_FONT_FOOTPRINT
197color_emoji_src := NotoColorEmoji-Subsetted.ttf
198endif # EXTENDED_FONT_FOOTPRINT
199
200include $(CLEAR_VARS)
201LOCAL_MODULE := NotoColorEmoji.ttf
202LOCAL_SRC_FILES := $(color_emoji_src)
203LOCAL_MODULE_CLASS := ETC
204LOCAL_MODULE_TAGS := optional
205LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts
206include $(BUILD_PREBUILT)
207
208color_emoji_src :=
209
210endif # !SMALLER_FONT_FOOTPRINT
211
212#############################################################################
213# Include a subset of NotoSansJP in EXTENDED_FONT_FOOTPRINT builds.
214#############################################################################
215
216ifeq ($(EXTENDED_FONT_FOOTPRINT),true)
217
218noto_sans_jp_src := NotoSansJP-Regular-Subsetted.otf
219
220include $(CLEAR_VARS)
221LOCAL_MODULE := NotoSansJP-Regular.otf
222LOCAL_SRC_FILES := $(noto_sans_jp_src)
223LOCAL_MODULE_CLASS := ETC
224LOCAL_MODULE_TAGS := optional
225LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts
226include $(BUILD_PREBUILT)
227
228noto_sans_jp_src :=
229
230endif # EXTENDED_FONT_FOOTPRINT
231