OSDN Git Service

Add Harfbuzz support for system fallback fonts
authorRussell Brenner <russellbrenner@google.com>
Wed, 10 Aug 2011 00:16:42 +0000 (17:16 -0700)
committerRussell Brenner <russellbrenner@google.com>
Tue, 16 Aug 2011 21:22:10 +0000 (14:22 -0700)
commitcfcbe02678eabf19b6b904be61d9991d4515ecb6
tree140dd8f6a945b66dd96a090f04f2629500c510df
parenta19896cc5d9573a17b6ec206befb3b4ec6b2256b
Add Harfbuzz support for system fallback fonts

When Skia resorts to fallback fonts for non-latin characters, it
retains the font ID of originally requested font, concealing the
fact that a fallback was invoked. Harfbuzz needs to know the fallback
font ID to read the correct GSUB/GPOS tables from the fallback font
file so that these complex languages can be properly rendered.

This change uses the script recognized by Harfbuzz as a means to
surmise the fallback font that would be used by Skia and then injects
that font file as a replacement for the originally requested font.

Bug: 5087744
Change-Id: I3a3469bcd589ee796c9b5a828fb47d40ecb38738
Source/WebCore/platform/graphics/android/FontAndroid.cpp
Source/WebCore/platform/graphics/android/FontPlatformData.h
Source/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp