From 7b0b897c548eab1bfd0e53da96582bb154ac87e3 Mon Sep 17 00:00:00 2001 From: Russell Brenner Date: Wed, 21 Mar 2012 13:29:54 -0700 Subject: [PATCH] Improved comments for vendor fonts xml Change-Id: I9dd7c8971df0a2862de316e096c1b6d60658814a --- data/fonts/vendor_fonts.xml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/data/fonts/vendor_fonts.xml b/data/fonts/vendor_fonts.xml index c1116d045df24..5850f9434639f 100644 --- a/data/fonts/vendor_fonts.xml +++ b/data/fonts/vendor_fonts.xml @@ -3,7 +3,12 @@ Vendor-provided fallback fonts This file can be edited to add references to fonts that are not installed or referenced in the - default system. The file should then be placed in /vendor/etc/fallback_fonts.xml. + default system. The file should then be placed in /vendor/etc/fallback_fonts.xml. Note + 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 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 @@ -28,11 +33,31 @@ 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, + 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. + can differ. For example, on a device supporting Japanese, but with English as the default, + /vendor/etc/fallback_fonts.xml might contain: + + + + + DroidSansJapanese.ttf + + + + + 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. + + + + + DroidSansJapanese.ttf + + + 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.