| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 #undef GetGlyphIndices | 9 #undef GetGlyphIndices |
| 10 | 10 |
| (...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1371 // DirectWrite does not provide for hinting hints. | 1371 // DirectWrite does not provide for hinting hints. |
| 1372 h = SkPaint::kSlight_Hinting; | 1372 h = SkPaint::kSlight_Hinting; |
| 1373 rec->setHinting(h); | 1373 rec->setHinting(h); |
| 1374 | 1374 |
| 1375 #if SK_FONT_HOST_USE_SYSTEM_SETTINGS | 1375 #if SK_FONT_HOST_USE_SYSTEM_SETTINGS |
| 1376 IDWriteFactory* factory; | 1376 IDWriteFactory* factory; |
| 1377 if (SUCCEEDED(get_dwrite_factory(&factory))) { | 1377 if (SUCCEEDED(get_dwrite_factory(&factory))) { |
| 1378 SkTScopedComPtr<IDWriteRenderingParams> defaultRenderingParams; | 1378 SkTScopedComPtr<IDWriteRenderingParams> defaultRenderingParams; |
| 1379 if (SUCCEEDED(factory->CreateRenderingParams(&defaultRenderingParams)))
{ | 1379 if (SUCCEEDED(factory->CreateRenderingParams(&defaultRenderingParams)))
{ |
| 1380 float gamma = defaultRenderingParams->GetGamma(); | 1380 float gamma = defaultRenderingParams->GetGamma(); |
| 1381 rec->setDeviceGamma(SkFloatToScalar(gamma)); | 1381 rec->setDeviceGamma(gamma); |
| 1382 rec->setPaintGamma(SkFloatToScalar(gamma)); | 1382 rec->setPaintGamma(gamma); |
| 1383 | 1383 |
| 1384 rec->setContrast(SkFloatToScalar(defaultRenderingParams->GetEnhanced
Contrast())); | 1384 rec->setContrast(defaultRenderingParams->GetEnhancedContrast()); |
| 1385 } | 1385 } |
| 1386 } | 1386 } |
| 1387 #endif | 1387 #endif |
| 1388 } | 1388 } |
| 1389 | 1389 |
| 1390 /////////////////////////////////////////////////////////////////////////////// | 1390 /////////////////////////////////////////////////////////////////////////////// |
| 1391 //PDF Support | 1391 //PDF Support |
| 1392 | 1392 |
| 1393 using namespace skia_advanced_typeface_metrics_utils; | 1393 using namespace skia_advanced_typeface_metrics_utils; |
| 1394 | 1394 |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1898 SK_TRACEHR(hr, "Could not get GetUserDefaultLocaleName."); | 1898 SK_TRACEHR(hr, "Could not get GetUserDefaultLocaleName."); |
| 1899 } else { | 1899 } else { |
| 1900 localeNameLen = getUserDefaultLocaleNameProc(localeNameStorage, LOCALE_N
AME_MAX_LENGTH); | 1900 localeNameLen = getUserDefaultLocaleNameProc(localeNameStorage, LOCALE_N
AME_MAX_LENGTH); |
| 1901 if (localeNameLen) { | 1901 if (localeNameLen) { |
| 1902 localeName = localeNameStorage; | 1902 localeName = localeNameStorage; |
| 1903 }; | 1903 }; |
| 1904 } | 1904 } |
| 1905 | 1905 |
| 1906 return SkNEW_ARGS(SkFontMgr_DirectWrite, (sysFontCollection.get(), localeNam
e, localeNameLen)); | 1906 return SkNEW_ARGS(SkFontMgr_DirectWrite, (sysFontCollection.get(), localeNam
e, localeNameLen)); |
| 1907 } | 1907 } |
| OLD | NEW |