| OLD | NEW |
| 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 Loading... |
| 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; // lfWidth is related to lfHeight, not to the OS/2::usWidt
hClass. |
| 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 SkFontStyle::kNormal_Width, |
| 131 lf.lfItalic ? SkFontStyle::kItalic_Slant : SkFontStyle::k
Upright_Slant); | 132 lf.lfItalic ? SkFontStyle::kItalic_Slant : SkFontStyle::k
Upright_Slant); |
| 132 } | 133 } |
| 133 | 134 |
| 134 static inline FIXED SkFixedToFIXED(SkFixed x) { | 135 static inline FIXED SkFixedToFIXED(SkFixed x) { |
| 135 return *(FIXED*)(&x); | 136 return *(FIXED*)(&x); |
| 136 } | 137 } |
| 137 static inline SkFixed SkFIXEDToFixed(FIXED x) { | 138 static inline SkFixed SkFIXEDToFixed(FIXED x) { |
| 138 return *(SkFixed*)(&x); | 139 return *(SkFixed*)(&x); |
| 139 } | 140 } |
| 140 | 141 |
| (...skipping 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) |
| OLD | NEW |