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

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: Update the Custom FontMgr also. 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 b8a3fe5b0d232de1c0c21c74c6613c1965445e25..607f8e35feba35ce759c966e50794e1c9e305574 100644
--- a/src/ports/SkFontMgr_fontconfig.cpp
+++ b/src/ports/SkFontMgr_fontconfig.cpp
@@ -390,7 +390,7 @@ public:
{ };
virtual void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const SK_OVERRIDE {
- desc->setStyle(this->style());
+ desc->setFontFileIndex(fIndex);
*serialize = true;
}
@@ -417,10 +417,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->setFontFileIndex(get_int(fPattern, FC_INDEX, 0));
*serialize = false;
}

Powered by Google App Engine
This is Rietveld 408576698