OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 SkScalerContext::kForceAutohinting_Flag | | 259 SkScalerContext::kForceAutohinting_Flag | |
260 SkScalerContext::kEmbolden_Flag | | 260 SkScalerContext::kEmbolden_Flag | |
261 SkScalerContext::kLCD_Vertical_Flag; | 261 SkScalerContext::kLCD_Vertical_Flag; |
262 rec->fFlags &= ~flagsWeDontSupport; | 262 rec->fFlags &= ~flagsWeDontSupport; |
263 | 263 |
264 SkPaint::Hinting h = rec->getHinting(); | 264 SkPaint::Hinting h = rec->getHinting(); |
265 // DirectWrite does not provide for hinting hints. | 265 // DirectWrite does not provide for hinting hints. |
266 h = SkPaint::kSlight_Hinting; | 266 h = SkPaint::kSlight_Hinting; |
267 rec->setHinting(h); | 267 rec->setHinting(h); |
268 | 268 |
269 #if SK_FONT_HOST_USE_SYSTEM_SETTINGS | 269 #if defined(SK_FONT_HOST_USE_SYSTEM_SETTINGS) |
270 IDWriteFactory* factory = get_dwrite_factory(); | 270 IDWriteFactory* factory = sk_get_dwrite_factory(); |
271 if (factory != nullptr) { | 271 if (factory != nullptr) { |
272 SkTScopedComPtr<IDWriteRenderingParams> defaultRenderingParams; | 272 SkTScopedComPtr<IDWriteRenderingParams> defaultRenderingParams; |
273 if (SUCCEEDED(factory->CreateRenderingParams(&defaultRenderingParams)))
{ | 273 if (SUCCEEDED(factory->CreateRenderingParams(&defaultRenderingParams)))
{ |
274 float gamma = defaultRenderingParams->GetGamma(); | 274 float gamma = defaultRenderingParams->GetGamma(); |
275 rec->setDeviceGamma(gamma); | 275 rec->setDeviceGamma(gamma); |
276 rec->setPaintGamma(gamma); | 276 rec->setPaintGamma(gamma); |
277 | 277 |
278 rec->setContrast(defaultRenderingParams->GetEnhancedContrast()); | 278 rec->setContrast(defaultRenderingParams->GetEnhancedContrast()); |
279 } | 279 } |
280 } | 280 } |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 SkAdvancedTypefaceMetrics::GetAdvance([borrowedFontFace](int gId
, int16_t* data) { | 458 SkAdvancedTypefaceMetrics::GetAdvance([borrowedFontFace](int gId
, int16_t* data) { |
459 return getWidthAdvance(borrowedFontFace, gId, data); | 459 return getWidthAdvance(borrowedFontFace, gId, data); |
460 }) | 460 }) |
461 ); | 461 ); |
462 } | 462 } |
463 } | 463 } |
464 | 464 |
465 return info; | 465 return info; |
466 } | 466 } |
467 #endif//defined(SK_BUILD_FOR_WIN32) | 467 #endif//defined(SK_BUILD_FOR_WIN32) |
OLD | NEW |