maxwen | 5682ac4 | 2020-01-15 02:12:00 +0100 | [diff] [blame] | 1 | # Copyright (C) 2018 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 | |
| 18 | LOCAL_PATH := $(call my-dir) |
| 19 | |
| 20 | ifneq ($(SMALLER_FONT_FOOTPRINT),true) |
| 21 | |
| 22 | include $(CLEAR_VARS) |
| 23 | |
| 24 | # Build the rest of font files as prebuilt. |
| 25 | # $(1): The source file name in LOCAL_PATH. |
| 26 | # It also serves as the module name and the dest file name. |
| 27 | define build-one-font-module |
| 28 | $(eval include $(CLEAR_VARS))\ |
| 29 | $(eval LOCAL_MODULE := $(1))\ |
| 30 | $(eval LOCAL_SRC_FILES := $(1))\ |
| 31 | $(eval LOCAL_MODULE_CLASS := ETC)\ |
| 32 | $(eval LOCAL_MODULE_TAGS := optional)\ |
| 33 | $(eval LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/fonts)\ |
| 34 | $(eval LOCAL_PRODUCT_MODULE := true) \ |
| 35 | $(eval include $(BUILD_PREBUILT)) |
| 36 | endef |
| 37 | |
| 38 | font_src_files := \ |
| 39 | Muli-Regular.ttf \ |
| 40 | Muli-Italic.ttf \ |
| 41 | Muli-Medium.ttf \ |
| 42 | Muli-MediumItalic.ttf \ |
| 43 | Muli-SemiBold.ttf \ |
| 44 | Muli-SemiBoldItalic.ttf \ |
| 45 | Muli-Bold.ttf \ |
| 46 | Muli-BoldItalic.ttf |
| 47 | |
| 48 | $(foreach f, $(font_src_files), $(call build-one-font-module, $(f))) |
| 49 | |
| 50 | build-one-font-module := |
| 51 | font_src_files := |
| 52 | |
| 53 | endif |