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

Unified Diff: src/ports/SkFontHost_win.cpp

Issue 76763002: De-generalize create_typeface on Windows. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 | « no previous file | src/ports/SkFontHost_win_dw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_win.cpp
===================================================================
--- src/ports/SkFontHost_win.cpp (revision 12308)
+++ src/ports/SkFontHost_win.cpp (working copy)
@@ -2436,22 +2436,6 @@
}
}
-static SkTypeface* create_typeface(const SkTypeface* familyFace,
- const char familyName[],
- unsigned styleBits) {
- LOGFONT lf;
- if (NULL == familyFace && NULL == familyName) {
- lf = get_default_font();
- } else if (familyFace) {
- LogFontTypeface* face = (LogFontTypeface*)familyFace;
- lf = face->fLogFont;
- } else {
- logfont_for_name(familyName, &lf);
- }
- setStyle(&lf, (SkTypeface::Style)styleBits);
- return SkCreateTypefaceFromLOGFONT(lf);
-}
-
///////////////////////////////////////////////////////////////////////////////
#include "SkFontMgr.h"
@@ -2604,7 +2588,14 @@
virtual SkTypeface* onLegacyCreateTypeface(const char familyName[],
unsigned styleBits) SK_OVERRIDE {
- return create_typeface(NULL, familyName, styleBits);
+ LOGFONT lf;
+ if (NULL == familyName) {
+ lf = get_default_font();
+ } else {
+ logfont_for_name(familyName, &lf);
+ }
+ setStyle(&lf, (SkTypeface::Style)styleBits);
+ return SkCreateTypefaceFromLOGFONT(lf);
}
private:
« no previous file with comments | « no previous file | src/ports/SkFontHost_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698