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

Unified Diff: src/ports/SkFontMgr_fontconfig.cpp

Issue 586473002: Restore old behavior of SkTypeface::CreateFromTypeface. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove extra newline. 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/core/SkTypeface.cpp ('k') | no next file » | 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 00b962afee1b1ad9f1717bd814eac424ad294c1b..6fc1f28c89bc318ce2d26622b5acf94f0da295ef 100644
--- a/src/ports/SkFontMgr_fontconfig.cpp
+++ b/src/ports/SkFontMgr_fontconfig.cpp
@@ -806,13 +806,9 @@ protected:
const SkFontStyle& style) const SK_OVERRIDE
{
//TODO: should the SkTypeface_fontconfig know its family?
- const char* name = NULL;
- if (typeface) {
- const SkTypeface_fontconfig* fcTypeface =
+ const SkTypeface_fontconfig* fcTypeface =
static_cast<const SkTypeface_fontconfig*>(typeface);
- name = get_string(fcTypeface->fPattern, FC_FAMILY);
- }
- return this->matchFamilyStyle(name, style);
+ return this->matchFamilyStyle(get_string(fcTypeface->fPattern, FC_FAMILY), style);
}
/** @param stream does not take ownership of the reference. */
« no previous file with comments | « src/core/SkTypeface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698