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

Side by Side Diff: src/ports/SkFontHost_win.cpp

Issue 1818043002: SkTypeface::MakeFromName to take SkFontStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« include/core/SkTypeface.h ('K') | « src/core/SkTypeface.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkTypes.h" 8 #include "SkTypes.h"
9 #if defined(SK_BUILD_FOR_WIN32) 9 #if defined(SK_BUILD_FOR_WIN32)
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (0 == GetTextFace(deviceContext, fontNameLen, fontName.get())) { 113 if (0 == GetTextFace(deviceContext, fontNameLen, fontName.get())) {
114 fontName[0] = 0; 114 fontName[0] = 0;
115 } 115 }
116 } 116 }
117 117
118 tchar_to_skstring(fontName.get(), familyName); 118 tchar_to_skstring(fontName.get(), familyName);
119 } 119 }
120 120
121 static void make_canonical(LOGFONT* lf) { 121 static void make_canonical(LOGFONT* lf) {
122 lf->lfHeight = -64; 122 lf->lfHeight = -64;
123 lf->lfWidth = 0;
bungeman-skia 2016/03/21 16:14:26 This seems wrong. Why is it here?
123 lf->lfQuality = CLEARTYPE_QUALITY;//PROOF_QUALITY; 124 lf->lfQuality = CLEARTYPE_QUALITY;//PROOF_QUALITY;
124 lf->lfCharSet = DEFAULT_CHARSET; 125 lf->lfCharSet = DEFAULT_CHARSET;
125 // lf->lfClipPrecision = 64; 126 // lf->lfClipPrecision = 64;
126 } 127 }
127 128
128 static SkFontStyle get_style(const LOGFONT& lf) { 129 static SkFontStyle get_style(const LOGFONT& lf) {
129 return SkFontStyle(lf.lfWeight, 130 return SkFontStyle(lf.lfWeight,
130 lf.lfWidth, 131 lf.lfWidth,
131 lf.lfItalic ? SkFontStyle::kItalic_Slant : SkFontStyle::k Upright_Slant); 132 lf.lfItalic ? SkFontStyle::kItalic_Slant : SkFontStyle::k Upright_Slant);
132 } 133 }
(...skipping 2375 matching lines...) Expand 10 before | Expand all | Expand 10 after
2508 2509
2509 private: 2510 private:
2510 SkTDArray<ENUMLOGFONTEX> fLogFontArray; 2511 SkTDArray<ENUMLOGFONTEX> fLogFontArray;
2511 }; 2512 };
2512 2513
2513 /////////////////////////////////////////////////////////////////////////////// 2514 ///////////////////////////////////////////////////////////////////////////////
2514 2515
2515 SkFontMgr* SkFontMgr_New_GDI() { return new SkFontMgrGDI; } 2516 SkFontMgr* SkFontMgr_New_GDI() { return new SkFontMgrGDI; }
2516 2517
2517 #endif//defined(SK_BUILD_FOR_WIN32) 2518 #endif//defined(SK_BUILD_FOR_WIN32)
OLDNEW
« include/core/SkTypeface.h ('K') | « src/core/SkTypeface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698