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

Unified Diff: src/ports/SkFontMgr_fontconfig.cpp

Issue 567013002: Serialize the font index. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move data into descriptor. 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
Index: src/ports/SkFontMgr_fontconfig.cpp
diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp
index f4cae23e03fce5498207009b6af9e4f536d99eaf..00b962afee1b1ad9f1717bd814eac424ad294c1b 100644
--- a/src/ports/SkFontMgr_fontconfig.cpp
+++ b/src/ports/SkFontMgr_fontconfig.cpp
@@ -394,7 +394,7 @@ public:
}
virtual void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const SK_OVERRIDE {
- desc->setStyle(this->style());
+ desc->setFontIndex(fIndex);
*serialize = true;
}
@@ -425,10 +425,10 @@ public:
virtual void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const SK_OVERRIDE {
FCLocker lock;
desc->setFamilyName(get_string(fPattern, FC_FAMILY));
- desc->setFontFileName(get_string(fPattern, FC_FILE));
desc->setFullName(get_string(fPattern, FC_FULLNAME));
desc->setPostscriptName(get_string(fPattern, FC_POSTSCRIPT_NAME));
- desc->setStyle(this->style());
+ desc->setFontFileName(get_string(fPattern, FC_FILE));
+ desc->setFontIndex(get_int(fPattern, FC_INDEX, 0));
*serialize = false;
}

Powered by Google App Engine
This is Rietveld 408576698