diff options
author | Ying Wang <wangying@google.com> | 2011-10-06 11:14:13 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2011-10-06 16:00:58 -0700 |
commit | 8e359817da14f6a4ffcf3bf4f7a59bc4fef8c211 (patch) | |
tree | 20579ef86aa311879c2fde554c076b4f41a967f4 /data/fonts | |
parent | ad9c5718daa556fb6907c3f600ea505c1ec3aca0 (diff) | |
download | frameworks_base-8e359817da14f6a4ffcf3bf4f7a59bc4fef8c211.zip frameworks_base-8e359817da14f6a4ffcf3bf4f7a59bc4fef8c211.tar.gz frameworks_base-8e359817da14f6a4ffcf3bf4f7a59bc4fef8c211.tar.bz2 |
Make symlinks for DroidSans.ttf and DroidSans-Bold.ttf
Bug: 5420351
Make the following symlinks:
/system/fonts/DroidSans.ttf -> Roboto-Regular.ttf
/system/fonts/DroidSans-Bold.ttf -> Roboto-Bold.ttf
Change-Id: If9a74ef4ac2386cdb46d125fed8ce5771e872310
Diffstat (limited to 'data/fonts')
-rw-r--r-- | data/fonts/Android.mk | 76 |
1 files changed, 49 insertions, 27 deletions
diff --git a/data/fonts/Android.mk b/data/fonts/Android.mk index db27cdc..02d2f3d 100644 --- a/data/fonts/Android.mk +++ b/data/fonts/Android.mk @@ -17,45 +17,67 @@ LOCAL_PATH := $(call my-dir) -ifeq ($(SMALLER_FONT_FOOTPRINT),true) -droidsans_fallback_src := DroidSansFallback.ttf -extra_droidsans_fonts := -else -droidsans_fallback_src := DroidSansFallbackFull.ttf -extra_droidsans_fonts := DroidSans.ttf DroidSans-Bold.ttf DroidSansEthiopic-Regular.ttf -endif +########################################## +# 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 $<) $@ -include $(CLEAR_VARS) -LOCAL_MODULE := DroidSansFallback.ttf -LOCAL_SRC_FILES := $(droidsans_fallback_src) -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts -LOCAL_REQUIRED_MODULES := $(extra_droidsans_fonts) -droidsans_fallback_src := -extra_droidsans_fonts := -include $(BUILD_PREBUILT) +# this magic makes LOCAL_REQUIRED_MODULES work +ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ + $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(font_symlink) -include $(CLEAR_VARS) -LOCAL_MODULE := DroidSans.ttf -LOCAL_SRC_FILES := $(LOCAL_MODULE) -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts -include $(BUILD_PREBUILT) +################################ +# 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 $<) $@ + +# this magic makes LOCAL_REQUIRED_MODULES work +ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ + $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(font_symlink) +################################ include $(CLEAR_VARS) -LOCAL_MODULE := DroidSans-Bold.ttf +LOCAL_MODULE := DroidSansEthiopic-Regular.ttf LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_CLASS := ETC 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 := DroidSansEthiopic-Regular.ttf -LOCAL_SRC_FILES := $(LOCAL_MODULE) +LOCAL_MODULE := DroidSansFallback.ttf +LOCAL_SRC_FILES := $(droidsans_fallback_src) LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_TAGS := optional LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts +LOCAL_REQUIRED_MODULES := $(extra_droidsans_fonts) include $(BUILD_PREBUILT) + +font_symlink_src := +font_symlink := +droidsans_fallback_src := +extra_droidsans_fonts := |