Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b0b897c authored by Russell Brenner's avatar Russell Brenner
Browse files

Improved comments for vendor fonts xml

Change-Id: I9dd7c8971df0a2862de316e096c1b6d60658814a
parent d49ea7f1
Loading
Loading
Loading
Loading
+28 −3
Original line number Diff line number Diff line
@@ -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.