From ac1cbaf2e5575ac75a0160e13089d51a0bb232fa Mon Sep 17 00:00:00 2001 From: Billy Hewlett Date: Wed, 18 Jul 2012 09:51:45 -0700 Subject: DO NOT MERGE Han Preference Cherry-pick Ib5dd86950156c5a438f25c289acb839206bb455a from master. Data: label MTLmr3m with "ja" locale attribute, fallback_fonts-ja.xml removed, as we only need a single fallback font file Code: Add locale and variant to TextLayoutCache. Paint.java sets textLocale as the language (for example, "ja") rather than the language/locale concatenated (for example "ja_JP") This checkin, along with Change-Id: Id8c91ae0be6cad8a7ef77a0cd5803676290986c1, allows text view objects to set their locale dynamically and skia will use the correct font for the locale. Change-Id: Ieb60b0d7a39fcfef4f8ce90cd4f6065d33673710 --- data/fonts/Android.mk | 11 +--- data/fonts/fallback_fonts-ja.xml | 121 --------------------------------------- data/fonts/fallback_fonts.xml | 11 ++-- data/fonts/vendor_fonts.xml | 34 ++--------- 4 files changed, 10 insertions(+), 167 deletions(-) delete mode 100644 data/fonts/fallback_fonts-ja.xml (limited to 'data') diff --git a/data/fonts/Android.mk b/data/fonts/Android.mk index 3d6c9d3..7bc172c 100644 --- a/data/fonts/Android.mk +++ b/data/fonts/Android.mk @@ -76,14 +76,6 @@ LOCAL_MODULE_TAGS := optional LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts include $(BUILD_PREBUILT) -include $(CLEAR_VARS) -LOCAL_MODULE := fallback_fonts-ja.xml -LOCAL_SRC_FILES := $(LOCAL_MODULE) -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_PATH := $(TARGET_OUT_ETC) -include $(BUILD_PREBUILT) - droidsans_fallback_src := DroidSansFallbackFull.ttf extra_font_files := \ DroidSans.ttf \ @@ -91,8 +83,7 @@ extra_font_files := \ DroidSansEthiopic-Regular.ttf \ DroidSansTamil-Regular.ttf \ DroidSansTamil-Bold.ttf \ - MTLmr3m.ttf \ - fallback_fonts-ja.xml + MTLmr3m.ttf endif # SMALLER_FONT_FOOTPRINT ################################ diff --git a/data/fonts/fallback_fonts-ja.xml b/data/fonts/fallback_fonts-ja.xml deleted file mode 100644 index 82e3a38..0000000 --- a/data/fonts/fallback_fonts-ja.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - DroidNaskh-Regular.ttf - - - - - DroidNaskh-Regular-SystemUI.ttf - - - - - DroidSansEthiopic-Regular.ttf - - - - - DroidSansHebrew-Regular.ttf - DroidSansHebrew-Bold.ttf - - - - - DroidSansThai.ttf - - - - - DroidSansArmenian.ttf - - - - - DroidSansGeorgian.ttf - - - - - DroidSansDevanagari-Regular.ttf - - - - - DroidSansTamil-Regular.ttf - DroidSansTamil-Bold.ttf - - - - - AnjaliNewLipi-light.ttf - - - - - Lohit-Bengali.ttf - - - - - Lohit-Kannada.ttf - - - - - AndroidEmoji.ttf - - - - - MTLmr3m.ttf - - - - - DroidSansFallback.ttf - - - - - - Lohit-Telugu.ttf - - - diff --git a/data/fonts/fallback_fonts.xml b/data/fonts/fallback_fonts.xml index 758adb5..2c9a0c8 100644 --- a/data/fonts/fallback_fonts.xml +++ b/data/fonts/fallback_fonts.xml @@ -24,12 +24,9 @@ Han languages (Chinese, Japanese, and Korean) share a common range of unicode characters; their ordering in the fallback or vendor files gives priority to the first in the list. - Locale-specific ordering can be configured by adding language and region codes to the end - of the filename (e.g. /system/etc/fallback_fonts-ja.xml). When no region code is used, - as with this example, all regions are matched. Use separate files for each supported locale. - The standard fallback file (fallback_fonts.xml) is used when a locale does not have its own - file. All fallback files must contain the same complete set of fonts; only their ordering - can differ. + Language-specific ordering can be configured by adding a BCP 47-style "lang" attribute to + a "file" element; fonts matching the language of text being drawn will be prioritised over + all others. --> @@ -106,7 +103,7 @@ - MTLmr3m.ttf + MTLmr3m.ttf \ No newline at end of file +---> -- cgit v1.1