| 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 "SkDWriteFontFileStream.h" | 8 #include "SkDWriteFontFileStream.h" |
| 9 #include "SkFontDescriptor.h" | 9 #include "SkFontDescriptor.h" |
| 10 #include "SkFontStream.h" | 10 #include "SkFontStream.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 return SkNEW_ARGS(SkScalerContext_DW, (const_cast<DWriteFontTypeface*>(this)
, desc)); | 235 return SkNEW_ARGS(SkScalerContext_DW, (const_cast<DWriteFontTypeface*>(this)
, desc)); |
| 236 } | 236 } |
| 237 | 237 |
| 238 void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const { | 238 void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const { |
| 239 if (rec->fFlags & SkScalerContext::kLCD_BGROrder_Flag || | 239 if (rec->fFlags & SkScalerContext::kLCD_BGROrder_Flag || |
| 240 rec->fFlags & SkScalerContext::kLCD_Vertical_Flag) | 240 rec->fFlags & SkScalerContext::kLCD_Vertical_Flag) |
| 241 { | 241 { |
| 242 rec->fMaskFormat = SkMask::kA8_Format; | 242 rec->fMaskFormat = SkMask::kA8_Format; |
| 243 } | 243 } |
| 244 | 244 |
| 245 unsigned flagsWeDontSupport = SkScalerContext::kDevKernText_Flag | | 245 unsigned flagsWeDontSupport = SkScalerContext::kVertical_Flag | |
| 246 SkScalerContext::kDevKernText_Flag | |
| 246 SkScalerContext::kForceAutohinting_Flag | | 247 SkScalerContext::kForceAutohinting_Flag | |
| 247 SkScalerContext::kEmbolden_Flag | | 248 SkScalerContext::kEmbolden_Flag | |
| 248 SkScalerContext::kLCD_BGROrder_Flag | | 249 SkScalerContext::kLCD_BGROrder_Flag | |
| 249 SkScalerContext::kLCD_Vertical_Flag; | 250 SkScalerContext::kLCD_Vertical_Flag; |
| 250 rec->fFlags &= ~flagsWeDontSupport; | 251 rec->fFlags &= ~flagsWeDontSupport; |
| 251 | 252 |
| 252 SkPaint::Hinting h = rec->getHinting(); | 253 SkPaint::Hinting h = rec->getHinting(); |
| 253 // DirectWrite does not provide for hinting hints. | 254 // DirectWrite does not provide for hinting hints. |
| 254 h = SkPaint::kSlight_Hinting; | 255 h = SkPaint::kSlight_Hinting; |
| 255 rec->setHinting(h); | 256 rec->setHinting(h); |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 getAdvanceData(fDWriteFontFace.get(), | 481 getAdvanceData(fDWriteFontFace.get(), |
| 481 glyphCount, | 482 glyphCount, |
| 482 glyphIDs, | 483 glyphIDs, |
| 483 glyphIDsCount, | 484 glyphIDsCount, |
| 484 getWidthAdvance)); | 485 getWidthAdvance)); |
| 485 } | 486 } |
| 486 } | 487 } |
| 487 | 488 |
| 488 return info; | 489 return info; |
| 489 } | 490 } |
| OLD | NEW |