summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorBilly Hewlett <billyh@google.com>2012-07-18 09:51:45 -0700
committerVictoria Lease <violets@google.com>2012-08-20 08:51:23 -0700
commitac1cbaf2e5575ac75a0160e13089d51a0bb232fa (patch)
tree55f2d81ea5059a57b6de18b13deadcff5b24bc35 /data
parentbf5740e75efd87ae0213486e78e029403804c6f0 (diff)
downloadframeworks_base-ac1cbaf2e5575ac75a0160e13089d51a0bb232fa.zip
frameworks_base-ac1cbaf2e5575ac75a0160e13089d51a0bb232fa.tar.gz
frameworks_base-ac1cbaf2e5575ac75a0160e13089d51a0bb232fa.tar.bz2
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
Diffstat (limited to 'data')
-rw-r--r--data/fonts/Android.mk11
-rw-r--r--data/fonts/fallback_fonts-ja.xml121
-rw-r--r--data/fonts/fallback_fonts.xml11
-rw-r--r--data/fonts/vendor_fonts.xml34
4 files changed, 10 insertions, 167 deletions
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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Fallback Fonts
-
- This file specifies the fonts, and the priority order, that will be searched for any
- glyphs not handled by the default fonts specified in /system/etc/system_fonts.xml.
- Each entry consists of a family tag and a list of files (file names) which support that
- family. The fonts for each family are listed in the order of the styles that they
- handle (the order is: regular, bold, italic, and bold-italic). The order in which the
- families are listed in this file represents the order in which these fallback fonts
- will be searched for glyphs that are not supported by the default system fonts (which are
- found in /system/etc/system_fonts.xml).
-
- Note that there is not nameset for fallback fonts, unlike the fonts specified in
- system_fonts.xml. The ability to support specific names in fallback fonts may be supported
- in the future. For now, the lack of files entries here is an indicator to the system that
- these are fallback fonts, instead of default named system fonts.
-
- There is another optional file in /vendor/etc/fallback_fonts.xml. That file can be used to
- provide references to other font families that should be used in addition to the default
- fallback fonts. That file can also specify the order in which the fallback fonts should be
- searched, to ensure that a vendor-provided font will be used before another fallback font
- which happens to handle the same glyph.
-
- 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.
--->
-<familyset>
- <family>
- <fileset>
- <file variant="elegant">DroidNaskh-Regular.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file variant="compact">DroidNaskh-Regular-SystemUI.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>DroidSansEthiopic-Regular.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>DroidSansHebrew-Regular.ttf</file>
- <file>DroidSansHebrew-Bold.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>DroidSansThai.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>DroidSansArmenian.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>DroidSansGeorgian.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>DroidSansDevanagari-Regular.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>DroidSansTamil-Regular.ttf</file>
- <file>DroidSansTamil-Bold.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>AnjaliNewLipi-light.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>Lohit-Bengali.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>Lohit-Kannada.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>AndroidEmoji.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>MTLmr3m.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>DroidSansFallback.ttf</file>
- </fileset>
- </family>
- <!--
- Fonts below this point have problematic glyphs and should not be moved
- higher in the fallback list until those glyphs have been fixed.
- -->
- <family>
- <fileset>
- <file>Lohit-Telugu.ttf</file> <!-- masks U+FFBC-10007 -->
- </fileset>
- </family>
-</familyset>
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.
-->
<familyset>
<family>
@@ -106,7 +103,7 @@
</family>
<family>
<fileset>
- <file>MTLmr3m.ttf</file>
+ <file lang="ja">MTLmr3m.ttf</file>
</fileset>
</family>
<!--
diff --git a/data/fonts/vendor_fonts.xml b/data/fonts/vendor_fonts.xml
index 5850f94..8690ee1 100644
--- a/data/fonts/vendor_fonts.xml
+++ b/data/fonts/vendor_fonts.xml
@@ -7,8 +7,7 @@
that in your makefile, this directory should be referenced as $(TARGET_COPY_OUT_VENDOR)/etc/:
PRODUCT_COPY_FILES += \
- frameworks/base/data/fonts/vendor_fonts.xml:$(TARGET_COPY_OUT_VENDOR)/etc/fallback_fonts.xml \
- frameworks/base/data/fonts/vendor_fonts-ja.xml:$(TARGET_COPY_OUT_VENDOR)/etc/fallback_fonts-ja.xml
+ frameworks/base/data/fonts/vendor_fonts.xml:$(TARGET_COPY_OUT_VENDOR)/etc/fallback_fonts.xml
For example, vendors might want to build configurations for locales that are
better served by fonts which either handle glyphs not supported in the default fonts or which
@@ -32,32 +31,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. /vendor/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. For example, on a device supporting Japanese, but with English as the default,
- /vendor/etc/fallback_fonts.xml might contain:
-
- <familyset>
- <family>
- <fileset>
- <file>DroidSansJapanese.ttf</file>
- </fileset>
- </family>
- </familyset>
-
- placing the Japanese font at the end of the fallback sequence for English, with a corresponding
- /system/vendor/etc/fallback_fonts-ja.xml, placing it at the front of the list.
-
- <familyset>
- <family order="0">
- <fileset>
- <file>DroidSansJapanese.ttf</file>
- </fileset>
- </family>
- </familyset>
+ 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.
The sample configuration below is an example of how one might provide two families of fonts
that get inserted at the first and second (0 and 1) position in the overall fallback fonts.
@@ -82,4 +58,4 @@
</fileset>
</family>
</familyset>
---> \ No newline at end of file
+--->