Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(832)

Unified Diff: src/ports/SkFontHost_android.cpp

Issue 14972022: Make the use of fallback fonts in Android a runtime decision. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPaintOptionsAndroid.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_android.cpp
diff --git a/src/ports/SkFontHost_android.cpp b/src/ports/SkFontHost_android.cpp
index aeeec953d313c3e32ee30ed00776504c5be885fa..2cdac19c01e814c38ffb44b39bad8ca2bdabe112 100644
--- a/src/ports/SkFontHost_android.cpp
+++ b/src/ports/SkFontHost_android.cpp
@@ -803,13 +803,14 @@ SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
SkTypeface* SkAndroidNextLogicalTypeface(SkFontID currFontID, SkFontID origFontID,
const SkPaintOptionsAndroid& options) {
-#if !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
- // Skia does not support font fallback for ndk applications in order to
- // enable clients such as WebKit to customize their font selection.
- // Clients can use GetFallbackFamilyNameForChar() to get the fallback
+ // Skia does not support font fallback by default for ndk applications. This
+ // enables clients such as WebKit to customize their font selection. In any
+ // case clients can use GetFallbackFamilyNameForChar() to get the fallback
// font for individual characters.
- return NULL;
-#endif
+ if (!options.isUsingFontFallbacks()) {
+ return NULL;
+ }
+
SkAutoMutexAcquire ac(gFamilyHeadAndNameListMutex);
load_system_fonts();
« no previous file with comments | « src/core/SkPaintOptionsAndroid.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698