Merge tag 'android-4.4.1_r1' into kitkat

Android 4.4.1 Release 1
Theme Engine [6/8]

SUMMARY
This commit will allow fonts to be changed in SKIA at runtime for android. We provide
a new method "ClearCache()" in SkTypeface. Calling this method will clear any typeface
caches in the library and reload default fonts.

Furthermore when android is loading /system/etc/system_fonts.xml there is now
parsing of /data/theme/theme_fonts.xml (if it exists). Clearing the cache
will cause these xml files to be reloaded. By modifying the theme_fonts.xml
and clearing the cache one can change fonts at runtime. Skia clients
simply need to create the font again.

BACKGROUND
SkFontConfigInterface_android.cpp provides android specific implementations
for font resolution. It does this by providing a SkFontConfigInterface singleton.
When the singleton is created it parses /system/etc/system_fonts.xml which provides a mapping
between the font name and the ttf file. There is also a vendor and fallback xml parsed.

Example:
 <family>
        <nameset>
            <name>sans-serif</name>
            <name>arial</name>
            <name>helvetica</name>
            <name>tahoma</name>
            <name>verdana</name>
        </nameset>
        <fileset>
            <file>Roboto-Regular.ttf</file>
            <file>Roboto-Bold.ttf</file>
            <file>Roboto-Italic.ttf</file>
            <file>Roboto-BoldItalic.ttf</file>
        </fileset>
    </family>

So in order to change the font mapping we clear this singleton. When the singleton
is requested again it will reload the xml file. Our change will now also load a xml in
the data partition so that new fonts can be downloaded and configured.

Clearing the singleton however is not enough. There are additional layers between the singleton and
the calling client that cache typefaces. So we needed to modify these files and clear caches from top down.

APENDIX A: CREATING A TYPEFACE OVERVIEW
Client
  |
SkTypeFace::CreateFromName
  |
SkFontHost::CreateTypeFace
  |
FontConfigTypeface::LegacyCreateTypeface //Will check SkTypefaceCache in this method call
  |
SkFontConfigInterface::matchFamilyName()
  |
SkFontConfigInterfaceAndroid::matchFamilyName //Android impl, uses info from parsed xml to resolve name

CONTRIBUTORS
Andrew Mast <andy@cyngn.com>
Clark Scheff <clark@cyngn.com>

Change-Id: I3972adebe76438b710cfc8241f35efd71e90811f

Only force purge all when clearing singleton interface

Fix for CYAN-4047

Always forcing the typeface cache to be purged can lead to system
lock ups.  It should only be forced because of a font change, in
which case we want the entire cache purged and then reloaded with
the new fonts.  Calling this any other time should have force set
to false, i.e. when Canvas calls PurgeAll().

Change-Id: Ibdeeeaa1ee67270da365b69c63c9c4914d60374e

Fallback to system's monospace font if theme excludes it

We should always have a monospace font available and if a theme
does not provide one the system's monospace font should be used.

Change-Id: Iaadf2f2c4d0dd7dd46d1eb58a687281440d70227
Merge tag 'android-4.4.3_r1.1' into HEAD

Android 4.4.3 release 1.1

Conflicts:
	include/ports/SkFontConfigInterface.h
	src/core/SkTypeface.cpp
	src/core/SkTypefaceCache.h

Change-Id: Icdd7b4bec0268772667813e4e9d072548b8a270a
Fix merge derp

* These methods are now public

Change-Id: I2eb1323d84e8c291d3587579782c7e765f195dad
Themes: Add system font families missing from theme

A theme's fonts may not include all the families defined in the
system's system_fonts.xml.  If a system font family is missing
from the theme's fonts, we add it.

This works for missing monospace fonts as well as other families,
such as serif.

Change-Id: Ib2a71fab582cfdf54f4d374d0c32cfebfaa1564f
Theme fallback font derp fix.

Change-Id: I1c5134ca6cc3244ad409dc5450f3f10f18ca18c5
Merge "Themes: Add system font families missing from theme" into kitkat
Merge branch 'kitkat' of https://github.com/AOSPA/android_external_skia into HEAD