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

Unified Diff: src/core/SkTypeface.cpp

Issue 1732263003: Make skpinfo able to inspect SK_PICT_TYPEFACE_TAG blocks (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix file Created 4 years, 10 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/core/SkTypeface.cpp
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp
index e6a9b4d66cd0f71988cb24e8eb840022ca9316d3..55d8f0e5a099377e1020e7a042b0df4b68bbc3fa 100644
--- a/src/core/SkTypeface.cpp
+++ b/src/core/SkTypeface.cpp
@@ -180,7 +180,13 @@ SkTypeface* SkTypeface::Deserialize(SkStream* stream) {
if (gDeserializeTypefaceDelegate) {
return (*gDeserializeTypefaceDelegate)(stream);
}
- SkFontDescriptor desc(stream);
+ SkFontDescriptor desc;
+
+ if (!SkFontDescriptor::Deserialize(stream, &desc)) {
+ SkDEBUGFAIL("Font Descriptor deserialization failed\n")
+ return nullptr;
+ }
+
SkFontData* data = desc.detachFontData();
if (data) {
SkTypeface* typeface = SkTypeface::CreateFromFontData(data);

Powered by Google App Engine
This is Rietveld 408576698