Home | History | Annotate | Download | only in noto-fonts
      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 NOTO_DIR := $(call my-dir)
     16 
     17 include $(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 #############################################################################
     25 define 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))
     33 endef
     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 #############################################################################
     40 ifneq ($(MINIMAL_FONT_FOOTPRINT),true)
     41 LOCAL_PATH := $(NOTO_DIR)/cjk
     42 
     43 font_src_files := \
     44     NotoSansCJK-Regular.ttc
     45 
     46 $(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))
     47 font_src_files :=
     48 
     49 endif # !MINIMAL_FONT_FOOTPRINT
     50 
     51 #############################################################################
     52 # Now "build" the Noto Color Emoji font, which is in its own directory. It is
     53 # not included in the MINIMAL_FONT_FOOTPRINT builds.
     54 #############################################################################
     55 ifneq ($(MINIMAL_FONT_FOOTPRINT),true)
     56 LOCAL_PATH := $(NOTO_DIR)/emoji
     57 
     58 font_src_files := \
     59     NotoColorEmoji.ttf
     60 
     61 $(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))
     62 font_src_files :=
     63 
     64 endif # !MINIMAL_FONT_FOOTPRINT
     65 
     66 #############################################################################
     67 # Now "build" the rest of the fonts, which live in a separate subdirectory.
     68 #############################################################################
     69 LOCAL_PATH := $(NOTO_DIR)/other
     70 
     71 #############################################################################
     72 # The following fonts are included in all builds.
     73 #############################################################################
     74 font_src_files := \
     75     NotoSerif-Regular.ttf \
     76     NotoSerif-Bold.ttf \
     77     NotoSerif-Italic.ttf \
     78     NotoSerif-BoldItalic.ttf
     79 
     80 #############################################################################
     81 # The following fonts are excluded from SMALLER_FONT_FOOTPRINT builds.
     82 #############################################################################
     83 ifneq ($(SMALLER_FONT_FOOTPRINT),true)
     84 font_src_files += \
     85     NotoSansAdlam-Regular.ttf \
     86     NotoSansAvestan-Regular.ttf \
     87     NotoSansBalinese-Regular.ttf \
     88     NotoSansBamum-Regular.ttf \
     89     NotoSansBatak-Regular.ttf \
     90     NotoSansBengali-Regular.ttf \
     91     NotoSansBengali-Bold.ttf \
     92     NotoSansBengaliUI-Regular.ttf \
     93     NotoSansBengaliUI-Bold.ttf \
     94     NotoSansBrahmi-Regular.ttf \
     95     NotoSansBuginese-Regular.ttf \
     96     NotoSansBuhid-Regular.ttf \
     97     NotoSansCanadianAboriginal-Regular.ttf \
     98     NotoSansCarian-Regular.ttf \
     99     NotoSansCham-Regular.ttf \
    100     NotoSansCham-Bold.ttf \
    101     NotoSansCherokee-Regular.ttf \
    102     NotoSansCoptic-Regular.ttf \
    103     NotoSansCuneiform-Regular.ttf \
    104     NotoSansCypriot-Regular.ttf \
    105     NotoSansDeseret-Regular.ttf \
    106     NotoSansEgyptianHieroglyphs-Regular.ttf \
    107     NotoSansEthiopic-Regular.ttf \
    108     NotoSansEthiopic-Bold.ttf \
    109     NotoSansGlagolitic-Regular.ttf \
    110     NotoSansGothic-Regular.ttf \
    111     NotoSansGujarati-Regular.ttf \
    112     NotoSansGujarati-Bold.ttf \
    113     NotoSansGujaratiUI-Regular.ttf \
    114     NotoSansGujaratiUI-Bold.ttf \
    115     NotoSansGurmukhi-Regular.ttf \
    116     NotoSansGurmukhi-Bold.ttf \
    117     NotoSansGurmukhiUI-Regular.ttf \
    118     NotoSansGurmukhiUI-Bold.ttf \
    119     NotoSansHanunoo-Regular.ttf \
    120     NotoSansImperialAramaic-Regular.ttf \
    121     NotoSansInscriptionalPahlavi-Regular.ttf \
    122     NotoSansInscriptionalParthian-Regular.ttf \
    123     NotoSansJavanese-Regular.ttf \
    124     NotoSansKaithi-Regular.ttf \
    125     NotoSansKannada-Regular.ttf \
    126     NotoSansKannada-Bold.ttf \
    127     NotoSansKannadaUI-Regular.ttf \
    128     NotoSansKannadaUI-Bold.ttf \
    129     NotoSansKayahLi-Regular.ttf \
    130     NotoSansKharoshthi-Regular.ttf \
    131     NotoSansKhmerUI-Regular.ttf \
    132     NotoSansKhmerUI-Bold.ttf \
    133     NotoSansLao-Regular.ttf \
    134     NotoSansLao-Bold.ttf \
    135     NotoSansLaoUI-Regular.ttf \
    136     NotoSansLaoUI-Bold.ttf \
    137     NotoSansLepcha-Regular.ttf \
    138     NotoSansLimbu-Regular.ttf \
    139     NotoSansLinearB-Regular.ttf \
    140     NotoSansLisu-Regular.ttf \
    141     NotoSansLycian-Regular.ttf \
    142     NotoSansLydian-Regular.ttf \
    143     NotoSansMalayalam-Regular.ttf \
    144     NotoSansMalayalam-Bold.ttf \
    145     NotoSansMalayalamUI-Regular.ttf \
    146     NotoSansMalayalamUI-Bold.ttf \
    147     NotoSansMandaic-Regular.ttf \
    148     NotoSansMeeteiMayek-Regular.ttf \
    149     NotoSansMongolian-Regular.ttf \
    150     NotoSansMyanmar-Regular.ttf \
    151     NotoSansMyanmar-Bold.ttf \
    152     NotoSansMyanmarUI-Regular.ttf \
    153     NotoSansMyanmarUI-Bold.ttf \
    154     NotoSansNewTaiLue-Regular.ttf \
    155     NotoSansNKo-Regular.ttf \
    156     NotoSansOgham-Regular.ttf \
    157     NotoSansOlChiki-Regular.ttf \
    158     NotoSansOldItalic-Regular.ttf \
    159     NotoSansOldPersian-Regular.ttf \
    160     NotoSansOldSouthArabian-Regular.ttf \
    161     NotoSansOldTurkic-Regular.ttf \
    162     NotoSansOriya-Regular.ttf \
    163     NotoSansOriya-Bold.ttf \
    164     NotoSansOriyaUI-Regular.ttf \
    165     NotoSansOriyaUI-Bold.ttf \
    166     NotoSansOsmanya-Regular.ttf \
    167     NotoSansPhagsPa-Regular.ttf \
    168     NotoSansPhoenician-Regular.ttf \
    169     NotoSansRejang-Regular.ttf \
    170     NotoSansRunic-Regular.ttf \
    171     NotoSansSamaritan-Regular.ttf \
    172     NotoSansSaurashtra-Regular.ttf \
    173     NotoSansShavian-Regular.ttf \
    174     NotoSansSinhala-Regular.ttf \
    175     NotoSansSinhala-Bold.ttf \
    176     NotoSansSundanese-Regular.ttf \
    177     NotoSansSylotiNagri-Regular.ttf \
    178     NotoSansSyriacEastern-Regular.ttf \
    179     NotoSansSyriacEstrangela-Regular.ttf \
    180     NotoSansSyriacWestern-Regular.ttf \
    181     NotoSansTagalog-Regular.ttf \
    182     NotoSansTagbanwa-Regular.ttf \
    183     NotoSansTaiLe-Regular.ttf \
    184     NotoSansTaiTham-Regular.ttf \
    185     NotoSansTaiViet-Regular.ttf \
    186     NotoSansTamil-Regular.ttf \
    187     NotoSansTamil-Bold.ttf \
    188     NotoSansTamilUI-Regular.ttf \
    189     NotoSansTamilUI-Bold.ttf \
    190     NotoSansTelugu-Regular.ttf \
    191     NotoSansTelugu-Bold.ttf \
    192     NotoSansTeluguUI-Regular.ttf \
    193     NotoSansTeluguUI-Bold.ttf \
    194     NotoSansThaana-Regular.ttf \
    195     NotoSansThaana-Bold.ttf \
    196     NotoSansTibetan-Regular.ttf \
    197     NotoSansTibetan-Bold.ttf \
    198     NotoSansTifinagh-Regular.ttf \
    199     NotoSansUgaritic-Regular.ttf \
    200     NotoSansVai-Regular.ttf \
    201     NotoSansYi-Regular.ttf
    202 endif # !SMALLER_FONT_FOOTPRINT
    203 
    204 #############################################################################
    205 # The following fonts are excluded from MINIMAL_FONT_FOOTPRINT builds.
    206 #############################################################################
    207 ifneq ($(MINIMAL_FONT_FOOTPRINT),true)
    208 font_src_files += \
    209     NotoNaskhArabic-Regular.ttf \
    210     NotoNaskhArabic-Bold.ttf \
    211     NotoNaskhArabicUI-Regular.ttf \
    212     NotoNaskhArabicUI-Bold.ttf \
    213     NotoSansArmenian-Regular.ttf \
    214     NotoSansArmenian-Bold.ttf \
    215     NotoSansDevanagari-Regular.ttf \
    216     NotoSansDevanagari-Bold.ttf \
    217     NotoSansDevanagariUI-Regular.ttf \
    218     NotoSansDevanagariUI-Bold.ttf \
    219     NotoSansGeorgian-Regular.ttf \
    220     NotoSansGeorgian-Bold.ttf \
    221     NotoSansHebrew-Regular.ttf \
    222     NotoSansHebrew-Bold.ttf \
    223     NotoSansSymbols-Regular-Subsetted.ttf \
    224     NotoSansSymbols-Regular-Subsetted2.ttf \
    225     NotoSansThai-Regular.ttf \
    226     NotoSansThai-Bold.ttf \
    227     NotoSansThaiUI-Regular.ttf \
    228     NotoSansThaiUI-Bold.ttf
    229 endif # !MINIMAL_FONT_FOOTPRINT
    230 
    231 $(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))
    232 
    233 #############################################################################
    234 # Now "build" the variable fonts, which live in a separate subdirectory.
    235 # The only variable fonts are for Khmer Sans, which is excluded in
    236 # SMALLER_FONT_FOOTPRINT build.
    237 #############################################################################
    238 
    239 ifneq ($(SMALLER_FONT_FOOTPRINT),true)
    240 
    241 LOCAL_PATH := $(NOTO_DIR)/other-vf
    242 
    243 font_src_files := \
    244     NotoSansKhmer-VF.ttf
    245 
    246 $(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))
    247 
    248 endif # !SMALLER_FONT_FOOTPRINT
    249 
    250 NOTO_DIR :=
    251 build-one-font-module :=
    252 font_src_files :=
    253