From 32a65c7ddd6bebe30af668274757599d5a47cc60 Mon Sep 17 00:00:00 2001 From: Roozbeh Pournader Date: Thu, 24 Jul 2014 14:36:04 -0700 Subject: [PATCH] Do not include DroidSansFallback on EXTENDED_FONT_FOOTPRINT builds. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The build file is modified to hang non-module fonts on DroidSansMono instead, now that a device may not have DroidSansFallback. Also, some cleanup is done to make the rules clearer and keep usages near definitions. The support for following character will disappear from the extended profiles because of this change: U+202A LEFT-TO-RIGHT EMBEDDING U+202B RIGHT-TO-LEFT EMBEDDING U+202C POP DIRECTIONAL FORMATTING U+202D LEFT-TO-RIGHT OVERRIDE U+F95A 讀 CJK COMPATIBILITY IDEOGRAPH-F95A U+F9F3 麟 CJK COMPATIBILITY IDEOGRAPH-F9F3 U+10400 𐐀 DESERET CAPITAL LETTER LONG I U+10428 𐐨 DESERET SMALL LETTER LONG I U+1044D 𐑍 DESERET SMALL LETTER ENG U+1044E 𐑎 DESERET SMALL LETTER OI U+1044F 𐑏 DESERET SMALL LETTER EW The first four are not needed, as HarfBuzz makes sure they are rendered as invisible, the two CJK compatibility characters have canonnical decompositions to unified ideographs already supported in included Noto Sans CJK fonts, and the Deseret letters were only in DroidSansFallback for testing purposes. Change-Id: Ibb7fa61dc851710ba14c3944281e228bd2e4f5b2 --- data/fonts/Android.mk | 45 ++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/data/fonts/Android.mk b/data/fonts/Android.mk index 9f6b64cb921f5..80fb1fdd3a8ab 100644 --- a/data/fonts/Android.mk +++ b/data/fonts/Android.mk @@ -47,14 +47,8 @@ extra_font_files := \ DroidSans-Bold.ttf ################################ -# On space-constrained devices, we include a subset of fonts: -ifeq ($(SMALLER_FONT_FOOTPRINT),true) - -droidsans_fallback_src := DroidSansFallback.ttf - -else # !SMALLER_FONT_FOOTPRINT - -droidsans_fallback_src := DroidSansFallbackFull.ttf +# Do not include Motoya on space-constrained devices +ifneq ($(SMALLER_FONT_FOOTPRINT),true) include $(CLEAR_VARS) LOCAL_MODULE := MTLmr3m.ttf @@ -65,24 +59,44 @@ LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts include $(BUILD_PREBUILT) extra_font_files += MTLmr3m.ttf -endif # SMALLER_FONT_FOOTPRINT +endif # !SMALLER_FONT_FOOTPRINT ################################ +# Use DroidSansMono to hang extra_font_files on +include $(CLEAR_VARS) +LOCAL_MODULE := DroidSansMono.ttf +LOCAL_SRC_FILES := $(LOCAL_MODULE) +LOCAL_MODULE_CLASS := ETC +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts +LOCAL_REQUIRED_MODULES := $(extra_font_files) +include $(BUILD_PREBUILT) +extra_font_files := + +################################ +# Include DroidSansFallback only on non-EXTENDED_FONT_FOOTPRINT builds +ifneq ($(EXTENDED_FONT_FOOTPRINT),true) + +# Include a subset of DroidSansFallback on SMALLER_FONT_FOOTPRINT build +ifeq ($(SMALLER_FONT_FOOTPRINT),true) +droidsans_fallback_src := DroidSansFallback.ttf +else # !SMALLER_FONT_FOOTPRINT +droidsans_fallback_src := DroidSansFallbackFull.ttf +endif # SMALLER_FONT_FOOTPRINT + 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_font_files) include $(BUILD_PREBUILT) - -font_symlink_src := -font_symlink := droidsans_fallback_src := -extra_font_files := + +endif # !EXTENDED_FONT_FOOTPRINT + ################################ -# Build the rest font files as prebuilt. +# Build the rest of font files as prebuilt. # $(1): The source file name in LOCAL_PATH. # It also serves as the module name and the dest file name. @@ -101,7 +115,6 @@ font_src_files := \ Roboto-Bold.ttf \ Roboto-Italic.ttf \ Roboto-BoldItalic.ttf \ - DroidSansMono.ttf \ Clockopia.ttf \ AndroidClock.ttf \ AndroidClock_Highlight.ttf \