diff options
author | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-09 19:26:59 +0000 |
---|---|---|
committer | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-09 19:26:59 +0000 |
commit | bae1712d2ec48671d59d08b292f118be7edf6dd8 (patch) | |
tree | a474ae2aa6bb6f9fddf19f8b97b22d3b66958e57 /include | |
parent | f04c40ef1e60e21f3e1b2a03b910211bf895b339 (diff) |
Disable automatic font fallback of SkFontHost_android when building for WebKit
The internal font fallback mechanism prevents WebKit from getting
the properties of the actually used font. Disable the internal fallback
mechanism when building for WebKit and add SkGetFallbackFamilyNameForChar()
to let the upper level know the fallback font for individial characters.
This commits a change that was submitted for review by...
wangxianzhu1 @ https://codereview.appspot.com/6572059/
BUG=913 (http://code.google.com/p/skia/issues/detail?id=913)
Review URL: https://codereview.appspot.com/6640048
git-svn-id: http://skia.googlecode.com/svn/trunk@5866 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/ports/SkTypeface_android.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/ports/SkTypeface_android.h b/include/ports/SkTypeface_android.h index 7e32fa3e28..1ee17e6eaa 100644 --- a/include/ports/SkTypeface_android.h +++ b/include/ports/SkTypeface_android.h @@ -59,6 +59,19 @@ SK_API const char* SkGetFallbackScriptID(FallbackScripts script); SK_API FallbackScripts SkGetFallbackScriptFromID(const char* id); /** + * Return a new typeface of the font in the fallback font list containing + * the specified chararacter. If no typeface is found, returns null. + */ +SK_API SkTypeface* SkCreateFallbackTypefaceForChar(SkUnichar uni, + SkTypeface::Style style); + +/** + * Get the family name of the font in the fallback font list containing + * the specified chararacter. if no font is found, returns false. + */ +SK_API bool SkGetFallbackFamilyNameForChar(SkUnichar uni, SkString* name); + +/** * For test only. * Load font config from given xml files, instead of those from Android system. */ |