Cherry pick: Try last resort on no-match in platformFallbackForCharacter on Android
Bug:13237403
Original description:
Try last resort on no-match in platformFallbackForCharacter on Android
On Android, some locale-preferred fonts (e.g. DroidSansFallback.ttf for
Chinese locale) doesn't contain all characters that the default locale
system fonts contain.
For characters that is missing in the font, fallback to the default
locale system font, by calling getLastResortFallbackFont() in
FontCache::platformFallbackForCharacter().
Also modified getLastResortFallbackFont() to prefer Skia default font
instead of the hard-coded default font (sans) and to map also cursive
and fantasy generic families.
Combined similar code in FontCacheSkia.cpp.
BUG=347121
TEST=FontCacheAndroid.platformFallbackForCharacter (will be enabled in
another CL)
R=dglazkov@chromium.org
Committed:
https://src.chromium.org/viewvc/blink?view=rev&revision=168410
Change-Id: I5262e759d7221b191d794df2c30099f877ecfdef
4 files changed