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

Unified Diff: src/ports/SkFontMgr_fontconfig.cpp

Issue 574873002: Add onGetFamilyName to SkTypeface. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add .get() for DirectWrite. Created 6 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 | « src/ports/SkFontMgr_android.cpp ('k') | src/ports/SkTypeface_win_dw.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_fontconfig.cpp
diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp
index b8a3fe5b0d232de1c0c21c74c6613c1965445e25..f4cae23e03fce5498207009b6af9e4f536d99eaf 100644
--- a/src/ports/SkFontMgr_fontconfig.cpp
+++ b/src/ports/SkFontMgr_fontconfig.cpp
@@ -389,6 +389,10 @@ public:
, fIndex(ttcIndex)
{ };
+ virtual void onGetFamilyName(SkString* familyName) const SK_OVERRIDE {
+ familyName->reset();
+ }
+
virtual void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const SK_OVERRIDE {
desc->setStyle(this->style());
*serialize = true;
@@ -414,6 +418,10 @@ public:
}
mutable SkAutoFcPattern fPattern;
+ virtual void onGetFamilyName(SkString* familyName) const SK_OVERRIDE {
+ *familyName = get_string(fPattern, FC_FAMILY);
+ }
+
virtual void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const SK_OVERRIDE {
FCLocker lock;
desc->setFamilyName(get_string(fPattern, FC_FAMILY));
« no previous file with comments | « src/ports/SkFontMgr_android.cpp ('k') | src/ports/SkTypeface_win_dw.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698