diff options
author | Russell Brenner <russellbrenner@google.com> | 2012-03-21 13:29:54 -0700 |
---|---|---|
committer | Russell Brenner <russellbrenner@google.com> | 2012-03-22 09:55:54 -0700 |
commit | 7b0b897c548eab1bfd0e53da96582bb154ac87e3 (patch) | |
tree | 88cbd88d3234461578e4757abf9c6b7f561aae71 /data | |
parent | d49ea7f11e18c2dce564fa974182c9d484be91dd (diff) | |
download | frameworks_base-7b0b897c548eab1bfd0e53da96582bb154ac87e3.zip frameworks_base-7b0b897c548eab1bfd0e53da96582bb154ac87e3.tar.gz frameworks_base-7b0b897c548eab1bfd0e53da96582bb154ac87e3.tar.bz2 |
Improved comments for vendor fonts xml
Change-Id: I9dd7c8971df0a2862de316e096c1b6d60658814a
Diffstat (limited to 'data')
-rw-r--r-- | data/fonts/vendor_fonts.xml | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/data/fonts/vendor_fonts.xml b/data/fonts/vendor_fonts.xml index c1116d0..5850f94 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: + + <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> 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. |