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 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1365 } | 1365 } |
1366 | 1366 |
1367 void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const { | 1367 void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const { |
1368 if (rec->fFlags & SkScalerContext::kLCD_BGROrder_Flag || | 1368 if (rec->fFlags & SkScalerContext::kLCD_BGROrder_Flag || |
1369 rec->fFlags & SkScalerContext::kLCD_Vertical_Flag) | 1369 rec->fFlags & SkScalerContext::kLCD_Vertical_Flag) |
1370 { | 1370 { |
1371 rec->fMaskFormat = SkMask::kA8_Format; | 1371 rec->fMaskFormat = SkMask::kA8_Format; |
1372 } | 1372 } |
1373 | 1373 |
1374 unsigned flagsWeDontSupport = SkScalerContext::kDevKernText_Flag | | 1374 unsigned flagsWeDontSupport = SkScalerContext::kDevKernText_Flag | |
1375 SkScalerContext::kAutohinting_Flag | | 1375 SkScalerContext::kForceAutohinting_Flag | |
1376 SkScalerContext::kEmbeddedBitmapText_Flag | | 1376 SkScalerContext::kEmbeddedBitmapText_Flag | |
1377 SkScalerContext::kEmbolden_Flag | | 1377 SkScalerContext::kEmbolden_Flag | |
1378 SkScalerContext::kLCD_BGROrder_Flag | | 1378 SkScalerContext::kLCD_BGROrder_Flag | |
1379 SkScalerContext::kLCD_Vertical_Flag; | 1379 SkScalerContext::kLCD_Vertical_Flag; |
1380 rec->fFlags &= ~flagsWeDontSupport; | 1380 rec->fFlags &= ~flagsWeDontSupport; |
1381 | 1381 |
1382 SkPaint::Hinting h = rec->getHinting(); | 1382 SkPaint::Hinting h = rec->getHinting(); |
1383 // DirectWrite does not provide for hinting hints. | 1383 // DirectWrite does not provide for hinting hints. |
1384 h = SkPaint::kSlight_Hinting; | 1384 h = SkPaint::kSlight_Hinting; |
1385 rec->setHinting(h); | 1385 rec->setHinting(h); |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1912 SK_TRACEHR(hr, "Could not get GetUserDefaultLocaleName."); | 1912 SK_TRACEHR(hr, "Could not get GetUserDefaultLocaleName."); |
1913 } else { | 1913 } else { |
1914 localeNameLen = getUserDefaultLocaleNameProc(localeNameStorage, LOCALE_N
AME_MAX_LENGTH); | 1914 localeNameLen = getUserDefaultLocaleNameProc(localeNameStorage, LOCALE_N
AME_MAX_LENGTH); |
1915 if (localeNameLen) { | 1915 if (localeNameLen) { |
1916 localeName = localeNameStorage; | 1916 localeName = localeNameStorage; |
1917 }; | 1917 }; |
1918 } | 1918 } |
1919 | 1919 |
1920 return SkNEW_ARGS(SkFontMgr_DirectWrite, (sysFontCollection.get(), localeNam
e, localeNameLen)); | 1920 return SkNEW_ARGS(SkFontMgr_DirectWrite, (sysFontCollection.get(), localeNam
e, localeNameLen)); |
1921 } | 1921 } |
OLD | NEW |