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

Unified Diff: src/core/SkTypeface.cpp

Issue 2030683002: Update typeface serialization style. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 6 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/core/SkFontDescriptor.cpp ('k') | src/fonts/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTypeface.cpp
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp
index 90a1eaabeca08d956974e96812bb5273ec5a0ffb..9ab37a80dff137825330dfe033c581df0dd234e9 100644
--- a/src/core/SkTypeface.cpp
+++ b/src/core/SkTypeface.cpp
@@ -167,7 +167,7 @@ void SkTypeface::serialize(SkWStream* wstream) const {
return;
}
bool isLocal = false;
- SkFontDescriptor desc(this->style());
+ SkFontDescriptor desc;
this->onGetFontDescriptor(&desc, &isLocal);
// Embed font data if it's a local font.
@@ -195,8 +195,7 @@ sk_sp<SkTypeface> SkTypeface::MakeDeserialize(SkStream* stream) {
}
}
- return SkTypeface::MakeFromName(desc.getFamilyName(),
- SkFontStyle::FromOldStyle(desc.getStyle()));
+ return SkTypeface::MakeFromName(desc.getFamilyName(), desc.getStyle());
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/core/SkFontDescriptor.cpp ('k') | src/fonts/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698