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

Unified Diff: include/ports/SkFontMgr.h

Issue 206683002: A remotable font management interface and DirectWrite implementation. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 9 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 | « gyp/utils.gyp ('k') | include/ports/SkFontMgr_indirect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/ports/SkFontMgr.h
===================================================================
--- include/ports/SkFontMgr.h (revision 13875)
+++ include/ports/SkFontMgr.h (working copy)
@@ -44,6 +44,9 @@
/**
* The caller must call unref() on the returned object.
* Never returns NULL; will return an empty set if the name is not found.
+ *
+ * It is possible that this will return a style set not accessible from
+ * createStyleSet(int) due to hidden or auto-activated fonts.
*/
SkFontStyleSet* matchFamily(const char familyName[]) const;
@@ -52,9 +55,24 @@
* and return a ref to it. The caller must call unref() on the returned
* object. Will never return NULL, as it will return the default font if
* no matching font is found.
+ *
+ * It is possible that this will return a style set not accessible from
+ * createStyleSet(int) or matchFamily(const char[]) due to hidden or
+ * auto-activated fonts.
*/
SkTypeface* matchFamilyStyle(const char familyName[], const SkFontStyle&) const;
+ /**
+ * Use the system fallback to find a typeface for the given character.
+ * Note that bpc47 is a combination of ISO 639, 15924, and 3166-1 codes,
+ * so it is fine to just pass a ISO 639 here.
+ *
+ * Will return NULL if no family can be found for the character
+ * in the system fallback.
+ */
+ SkTypeface* matchFamilyStyleCharacter(const char familyName[], const SkFontStyle&,
+ const char bpc47[], uint32_t character) const;
+
SkTypeface* matchFaceStyle(const SkTypeface*, const SkFontStyle&) const;
/**
@@ -98,6 +116,10 @@
virtual SkTypeface* onMatchFamilyStyle(const char familyName[],
const SkFontStyle&) const = 0;
+ // TODO: pure virtual, implement on all impls.
+ virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&,
+ const char bpc47[], uint32_t character) const
+ { return NULL; }
virtual SkTypeface* onMatchFaceStyle(const SkTypeface*,
const SkFontStyle&) const = 0;
« no previous file with comments | « gyp/utils.gyp ('k') | include/ports/SkFontMgr_indirect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698