summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2012-02-13 18:55:41 -0800
committerYing Wang <wangying@google.com>2012-02-13 18:55:41 -0800
commit193ec66214ecf4cdb43702655a4a571ae0c7e6ce (patch)
tree6212a3dbd5f92444b31089b67528894d5c651bab /data
parent94355ed44a88d619f94948285a8dbe51ed7a7cb0 (diff)
downloadframeworks_base-193ec66214ecf4cdb43702655a4a571ae0c7e6ce.zip
frameworks_base-193ec66214ecf4cdb43702655a4a571ae0c7e6ce.tar.gz
frameworks_base-193ec66214ecf4cdb43702655a4a571ae0c7e6ce.tar.bz2
Build all font files as prebuilts.
Bug: 5972956 So that mm/mmm can be used to install all the font files. Change-Id: I9378e98b3a01d26680613e5738a270077bca0b64
Diffstat (limited to 'data')
-rw-r--r--data/fonts/Android.mk54
-rw-r--r--data/fonts/fonts.mk48
2 files changed, 71 insertions, 31 deletions
diff --git a/data/fonts/Android.mk b/data/fonts/Android.mk
index 02d2f3d..ef38a60 100644
--- a/data/fonts/Android.mk
+++ b/data/fonts/Android.mk
@@ -51,6 +51,11 @@ ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
$(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(font_symlink)
################################
+# On space-constrained devices, we include a subset of fonts:
+ifeq ($(SMALLER_FONT_FOOTPRINT),true)
+droidsans_fallback_src := DroidSansFallback.ttf
+extra_droidsans_fonts := DroidSans.ttf DroidSans-Bold.ttf
+else
include $(CLEAR_VARS)
LOCAL_MODULE := DroidSansEthiopic-Regular.ttf
LOCAL_SRC_FILES := $(LOCAL_MODULE)
@@ -59,15 +64,11 @@ LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts
include $(BUILD_PREBUILT)
-################################
-ifeq ($(SMALLER_FONT_FOOTPRINT),true)
-droidsans_fallback_src := DroidSansFallback.ttf
-extra_droidsans_fonts := DroidSans.ttf DroidSans-Bold.ttf
-else
droidsans_fallback_src := DroidSansFallbackFull.ttf
extra_droidsans_fonts := DroidSans.ttf DroidSans-Bold.ttf DroidSansEthiopic-Regular.ttf
endif # SMALLER_FONT_FOOTPRINT
+################################
include $(CLEAR_VARS)
LOCAL_MODULE := DroidSansFallback.ttf
LOCAL_SRC_FILES := $(droidsans_fallback_src)
@@ -81,3 +82,46 @@ font_symlink_src :=
font_symlink :=
droidsans_fallback_src :=
extra_droidsans_fonts :=
+
+################################
+# Build the rest font files as prebuilt.
+
+# $(1): The source file name in LOCAL_PATH.
+# It also serves as the module name and the dest file name.
+define build-one-font-module
+$(eval include $(CLEAR_VARS))\
+$(eval LOCAL_MODULE := $(1))\
+$(eval LOCAL_SRC_FILES := $(1))\
+$(eval LOCAL_MODULE_CLASS := ETC)\
+$(eval LOCAL_MODULE_TAGS := optional)\
+$(eval LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts)\
+$(eval include $(BUILD_PREBUILT))
+endef
+
+font_src_files := \
+ Roboto-Regular.ttf \
+ Roboto-Bold.ttf \
+ Roboto-Italic.ttf \
+ Roboto-BoldItalic.ttf \
+ DroidSansArabic.ttf \
+ DroidNaskh-Regular.ttf \
+ DroidSansHebrew-Regular.ttf \
+ DroidSansHebrew-Bold.ttf \
+ DroidSansThai.ttf \
+ DroidSerif-Regular.ttf \
+ DroidSerif-Bold.ttf \
+ DroidSerif-Italic.ttf \
+ DroidSerif-BoldItalic.ttf \
+ DroidSansMono.ttf \
+ DroidSansArmenian.ttf \
+ DroidSansGeorgian.ttf \
+ AndroidEmoji.ttf \
+ Clockopia.ttf \
+ AndroidClock.ttf \
+ AndroidClock_Highlight.ttf \
+ AndroidClock_Solid.ttf \
+
+$(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))
+
+build-one-font-module :=
+font_src_files :=
diff --git a/data/fonts/fonts.mk b/data/fonts/fonts.mk
index 6a9ed53..458f85b 100644
--- a/data/fonts/fonts.mk
+++ b/data/fonts/fonts.mk
@@ -14,34 +14,30 @@
# Warning: this is actually a product definition, to be inherited from
-# On space-constrained devices, we include a subset of fonts:
-# First, core/required fonts
PRODUCT_COPY_FILES := \
- frameworks/base/data/fonts/Roboto-Regular.ttf:system/fonts/Roboto-Regular.ttf \
- frameworks/base/data/fonts/Roboto-Bold.ttf:system/fonts/Roboto-Bold.ttf \
- frameworks/base/data/fonts/Roboto-Italic.ttf:system/fonts/Roboto-Italic.ttf \
- frameworks/base/data/fonts/Roboto-BoldItalic.ttf:system/fonts/Roboto-BoldItalic.ttf \
- frameworks/base/data/fonts/DroidSansArabic.ttf:system/fonts/DroidSansArabic.ttf \
- frameworks/base/data/fonts/DroidNaskh-Regular.ttf:system/fonts/DroidNaskh-Regular.ttf \
- frameworks/base/data/fonts/DroidSansHebrew-Regular.ttf:system/fonts/DroidSansHebrew-Regular.ttf \
- frameworks/base/data/fonts/DroidSansHebrew-Bold.ttf:system/fonts/DroidSansHebrew-Bold.ttf \
- frameworks/base/data/fonts/DroidSansThai.ttf:system/fonts/DroidSansThai.ttf \
- frameworks/base/data/fonts/DroidSerif-Regular.ttf:system/fonts/DroidSerif-Regular.ttf \
- frameworks/base/data/fonts/DroidSerif-Bold.ttf:system/fonts/DroidSerif-Bold.ttf \
- frameworks/base/data/fonts/DroidSerif-Italic.ttf:system/fonts/DroidSerif-Italic.ttf \
- frameworks/base/data/fonts/DroidSerif-BoldItalic.ttf:system/fonts/DroidSerif-BoldItalic.ttf \
- frameworks/base/data/fonts/DroidSansMono.ttf:system/fonts/DroidSansMono.ttf \
- frameworks/base/data/fonts/DroidSansArmenian.ttf:system/fonts/DroidSansArmenian.ttf \
- frameworks/base/data/fonts/DroidSansGeorgian.ttf:system/fonts/DroidSansGeorgian.ttf \
- frameworks/base/data/fonts/AndroidEmoji.ttf:system/fonts/AndroidEmoji.ttf \
- frameworks/base/data/fonts/Clockopia.ttf:system/fonts/Clockopia.ttf \
- frameworks/base/data/fonts/AndroidClock.ttf:system/fonts/AndroidClock.ttf \
- frameworks/base/data/fonts/AndroidClock_Highlight.ttf:system/fonts/AndroidClock_Highlight.ttf \
- frameworks/base/data/fonts/AndroidClock_Solid.ttf:system/fonts/AndroidClock_Solid.ttf \
frameworks/base/data/fonts/system_fonts.xml:system/etc/system_fonts.xml \
frameworks/base/data/fonts/fallback_fonts.xml:system/etc/fallback_fonts.xml
-# Next, include additional fonts, depending on how much space we have.
-# Details see module definitions in Android.mk.
PRODUCT_PACKAGES := \
- DroidSansFallback.ttf
+ DroidSansFallback.ttf \
+ Roboto-Regular.ttf \
+ Roboto-Bold.ttf \
+ Roboto-Italic.ttf \
+ Roboto-BoldItalic.ttf \
+ DroidSansArabic.ttf \
+ DroidNaskh-Regular.ttf \
+ DroidSansHebrew-Regular.ttf \
+ DroidSansHebrew-Bold.ttf \
+ DroidSansThai.ttf \
+ DroidSerif-Regular.ttf \
+ DroidSerif-Bold.ttf \
+ DroidSerif-Italic.ttf \
+ DroidSerif-BoldItalic.ttf \
+ DroidSansMono.ttf \
+ DroidSansArmenian.ttf \
+ DroidSansGeorgian.ttf \
+ AndroidEmoji.ttf \
+ Clockopia.ttf \
+ AndroidClock.ttf \
+ AndroidClock_Highlight.ttf \
+ AndroidClock_Solid.ttf \