vendor_fonts.xml revision 2b4b35c13a1569da74601a013d8203ba458e2e02
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3    Vendor-provided fallback fonts
4
5    This file can be edited to add references to fonts that are not installed or referenced in the
6    default system. The file should then be placed in /vendor/etc/fallback_fonts.xml.
7
8    For example, vendors might want to build configurations for locales that are
9    better served by fonts which either handle glyphs not supported in the default fonts or which
10    handle these glyphs differently than the default fallback fonts.
11    Each entry in this list is a "family", which consists of a list of "files"
12    (the filenames for that family). The files objects are
13    provided in the order of the styles supported for that family: regular, bold, italic, and
14    bold-italic. Only providing one font means that all styles will be rendered with that font.
15    Providing two means that these two fonts will render regular and bold fonts (italics will
16    be mapped to these two fonts).
17
18    There is also an optional "order" attribute on the Family tag. This specifies the index at
19    which that family of fonts should be inserted in the fallback font list, where the
20    default fallback fonts on the system (in /system/etc/fallback_fonts.xml) start at index 0.
21    If no 'order' attribute is supplied, that family will be inserted either at the end of the
22    current fallback list (if no order was supplied for any previous family in this file) or
23    after the previous family (if there was an order specified previously). Typically, vendors
24    may want to supply an order for the first family that puts this set of fonts at the appropriate
25    place in the overall fallback fonts. The order of this list determines which fallback font
26    will be used to support any glyphs that are not handled by the default system fonts.
27
28    Han languages (Chinese, Japanese, and Korean) share a common range of unicode characters;
29    their ordering in the fallback or vendor files gives priority to the first in the list.
30    Locale-specific ordering can be configured by adding language and region codes to the end
31    of the filename (e.g. /system/etc/fallback_fonts-ja.xml). When no region code is used,
32    as with this example, all regions are matched. Use separate files for each supported locale.
33    The standard fallback file (fallback_fonts.xml) is used when a locale does not have its own
34    file. All fallback files must contain the same complete set of fonts; only their ordering
35    can differ.
36
37    The sample configuration below is an example of how one might provide two families of fonts
38    that get inserted at the first and second (0  and 1) position in the overall fallback fonts.
39
40    See /system/etc/system_fonts.xml and /system/etc/fallback_fonts.xml for more information
41    and to understand the order in which the default system fonts are loaded and structured for
42    lookup.
43-->
44
45<!-- Sample fallback font additions to the default fallback list. These fonts will be added
46    to the top two positions of the fallback list, since the first has an order of 0. -->
47<!--
48<familyset>
49    <family order="0">
50        <fileset>
51            <file>MyFont.ttf</file>
52        </fileset>
53    </family>
54    <family>
55        <fileset>
56            <file>MyOtherFont.ttf</file>
57        </fileset>
58    </family>
59</familyset>
60-->