summaryrefslogtreecommitdiffstats
path: root/data/fonts/Android.mk
diff options
context:
space:
mode:
authorKeun young Park <keunyoung@google.com>2012-06-05 15:20:17 -0700
committerKeun young Park <keunyoung@google.com>2012-06-06 14:21:37 -0700
commit087610198e82bc5537b2a8e9c07ed6a20829a16d (patch)
tree3529c9cf8c4749040fce00e85d345ed596b28a2a /data/fonts/Android.mk
parentda741b4f2437458394a05421c50b7f11995181fa (diff)
downloadframeworks_base-087610198e82bc5537b2a8e9c07ed6a20829a16d.zip
frameworks_base-087610198e82bc5537b2a8e9c07ed6a20829a16d.tar.gz
frameworks_base-087610198e82bc5537b2a8e9c07ed6a20829a16d.tar.bz2
add MINIMAL_FONT_FOOTPRINT configuration for PDK
- all non-latin fonts excluded - symlink used to create additional fonts Bug: 6540216 Change-Id: Id0909124dc1d71331bde3c5911c24eee5b1692a2
Diffstat (limited to 'data/fonts/Android.mk')
-rw-r--r--data/fonts/Android.mk81
1 files changed, 41 insertions, 40 deletions
diff --git a/data/fonts/Android.mk b/data/fonts/Android.mk
index ebd9a47..3d6c9d3 100644
--- a/data/fonts/Android.mk
+++ b/data/fonts/Android.mk
@@ -18,37 +18,25 @@
LOCAL_PATH := $(call my-dir)
##########################################
-# We may only afford small font footprint.
-##########################################
-# Use only symlinks.
-# Symlink: DroidSans.ttf -> Roboto-Regular.ttf
-LOCAL_MODULE := DroidSans.ttf
-font_symlink_src := $(PRODUCT_OUT)/system/fonts/Roboto-Regular.ttf
-font_symlink := $(dir $(font_symlink_src))$(LOCAL_MODULE)
-$(font_symlink) : $(font_symlink_src)
- @echo "Symlink: $@ -> $<"
- @mkdir -p $(dir $@)
- @rm -rf $@
- $(hide) ln -sf $(notdir $<) $@
-
+# create symlink for given font
+# $(1): new font $(2): link target
+# should be used with eval: $(eval $(call ...))
+define create-font-symlink
+$(PRODUCT_OUT)/system/fonts/$(1) : $(PRODUCT_OUT)/system/fonts/$(2)
+ @echo "Symlink: $$@ -> $$<"
+ @mkdir -p $$(dir $$@)
+ @rm -rf $$@
+ $(hide) ln -sf $$(notdir $$<) $$@
# this magic makes LOCAL_REQUIRED_MODULES work
-ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
- $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(font_symlink)
-
-################################
-# Symlink: DroidSans-Bold.ttf -> Roboto-Bold.ttf
-LOCAL_MODULE := DroidSans-Bold.ttf
-font_symlink_src := $(PRODUCT_OUT)/system/fonts/Roboto-Bold.ttf
-font_symlink := $(dir $(font_symlink_src))$(LOCAL_MODULE)
-$(font_symlink) : $(font_symlink_src)
- @echo "Symlink: $@ -> $<"
- @mkdir -p $(dir $@)
- @rm -rf $@
- $(hide) ln -sf $(notdir $<) $@
+ALL_MODULES.$(1).INSTALLED := \
+ $(ALL_MODULES.$(1).INSTALLED) $(PRODUCT_OUT)/system/fonts/$(1)
+endef
-# this magic makes LOCAL_REQUIRED_MODULES work
-ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
- $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(font_symlink)
+##########################################
+# We may only afford small font footprint.
+##########################################
+$(eval $(call create-font-symlink,DroidSans.ttf,Roboto-Regular.ttf))
+$(eval $(call create-font-symlink,DroidSans-Bold.ttf,Roboto-Bold.ttf))
################################
# On space-constrained devices, we include a subset of fonts:
@@ -121,7 +109,6 @@ font_symlink_src :=
font_symlink :=
droidsans_fallback_src :=
extra_font_files :=
-
################################
# Build the rest font files as prebuilt.
@@ -142,6 +129,27 @@ font_src_files := \
Roboto-Bold.ttf \
Roboto-Italic.ttf \
Roboto-BoldItalic.ttf \
+ DroidSerif-Regular.ttf \
+ DroidSerif-Bold.ttf \
+ DroidSerif-Italic.ttf \
+ DroidSerif-BoldItalic.ttf \
+ DroidSansMono.ttf \
+ Clockopia.ttf \
+ AndroidClock.ttf \
+ AndroidClock_Highlight.ttf \
+ AndroidClock_Solid.ttf
+
+ifeq ($(MINIMAL_FONT_FOOTPRINT),true)
+
+$(eval $(call create-font-symlink,Roboto-Light.ttf,Roboto-Regular.ttf))
+$(eval $(call create-font-symlink,Roboto-LightItalic.ttf,Roboto-Italic.ttf))
+$(eval $(call create-font-symlink,RobotoCondensed-Regular.ttf,Roboto-Regular.ttf))
+$(eval $(call create-font-symlink,RobotoCondensed-Bold.ttf,Roboto-Bold.ttf))
+$(eval $(call create-font-symlink,RobotoCondensed-Italic.ttf,Roboto-Italic.ttf))
+$(eval $(call create-font-symlink,RobotoCondensed-BoldItalic.ttf,Roboto-BoldItalic.ttf))
+
+else # !MINIMAL_FONT
+font_src_files += \
Roboto-Light.ttf \
Roboto-LightItalic.ttf \
RobotoCondensed-Regular.ttf \
@@ -154,18 +162,11 @@ font_src_files := \
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 \
+ AndroidEmoji.ttf
+
+endif # !MINIMAL_FONT
$(foreach f, $(font_src_files), $(call build-one-font-module, $(f)))