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

Unified Diff: include/ports/SkTypeface_android.h

Issue 23819067: Add new entry point that supports fallback font selection based on language. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: improvements Created 7 years, 3 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 | « include/core/SkPaintOptionsAndroid.h ('k') | src/ports/SkFontConfigInterface_android.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/ports/SkTypeface_android.h
diff --git a/include/ports/SkTypeface_android.h b/include/ports/SkTypeface_android.h
index 655670fb6b4625718c24f2df931cc7abba1cfc87..1ee923c4e66b7f62073e18b2ed1d60c8d3330755 100644
--- a/include/ports/SkTypeface_android.h
+++ b/include/ports/SkTypeface_android.h
@@ -17,11 +17,33 @@ class SkPaintOptionsAndroid;
/**
* Get the family name of the font in the fallback font list containing
- * the specified character. if no font is found, returns false.
+ * the specified character using the system's default language. This function
+ * also assumes the only families with the elegant or default variants will be
+ * returned.
+ *
+ * @param uni The unicode character to use for the lookup.
+ * @param name The family name of the font file containing the unicode character
+ * in the default language
+ * @return true if a font is found and false otherwise
*/
SK_API bool SkGetFallbackFamilyNameForChar(SkUnichar uni, SkString* name);
/**
+ * Get the family name of the font in the fallback font list containing
+ * the specified character taking into account the provided language. This
+ * function also assumes the only families with the elegant or default variants
+ * will be returned.
+ *
+ * @param uni The unicode character to use for the lookup.
+ * @param lang The null terminated string representing the BCP 47 language
+ * identifier for the preferred language
+ * @param name The family name of the font file containing the unicode character
+ * in the preferred language
+ * @return true if a font is found and false otherwise
+ */
+SK_API bool SkGetFallbackFamilyNameForChar(SkUnichar uni, const char* lang, SkString* name);
+
+/**
* For test only.
* Load font config from given xml files, instead of those from Android system.
*/
« no previous file with comments | « include/core/SkPaintOptionsAndroid.h ('k') | src/ports/SkFontConfigInterface_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698