| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 HRNM(fontFile->GetLoader(&fontFileLoader), "Could not get font file loader."
); | 237 HRNM(fontFile->GetLoader(&fontFileLoader), "Could not get font file loader."
); |
| 238 | 238 |
| 239 SkTScopedComPtr<IDWriteFontFileStream> fontFileStream; | 239 SkTScopedComPtr<IDWriteFontFileStream> fontFileStream; |
| 240 HRNM(fontFileLoader->CreateStreamFromKey(fontFileKey, fontFileKeySize, | 240 HRNM(fontFileLoader->CreateStreamFromKey(fontFileKey, fontFileKeySize, |
| 241 &fontFileStream), | 241 &fontFileStream), |
| 242 "Could not create font file stream."); | 242 "Could not create font file stream."); |
| 243 | 243 |
| 244 return new SkDWriteFontFileStream(fontFileStream.get()); | 244 return new SkDWriteFontFileStream(fontFileStream.get()); |
| 245 } | 245 } |
| 246 | 246 |
| 247 SkScalerContext* DWriteFontTypeface::onCreateScalerContext(const SkDescriptor* d
esc) const { | 247 SkScalerContext* DWriteFontTypeface::onCreateScalerContext(const SkScalerContext
Effects& effects, |
| 248 return new SkScalerContext_DW(const_cast<DWriteFontTypeface*>(this), desc); | 248 const SkDescriptor* d
esc) const { |
| 249 return new SkScalerContext_DW(const_cast<DWriteFontTypeface*>(this), effects
, desc); |
| 249 } | 250 } |
| 250 | 251 |
| 251 void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const { | 252 void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const { |
| 252 if (rec->fFlags & SkScalerContext::kLCD_Vertical_Flag) { | 253 if (rec->fFlags & SkScalerContext::kLCD_Vertical_Flag) { |
| 253 rec->fMaskFormat = SkMask::kA8_Format; | 254 rec->fMaskFormat = SkMask::kA8_Format; |
| 254 } | 255 } |
| 255 | 256 |
| 256 unsigned flagsWeDontSupport = SkScalerContext::kVertical_Flag | | 257 unsigned flagsWeDontSupport = SkScalerContext::kVertical_Flag | |
| 257 SkScalerContext::kDevKernText_Flag | | 258 SkScalerContext::kDevKernText_Flag | |
| 258 SkScalerContext::kForceAutohinting_Flag | | 259 SkScalerContext::kForceAutohinting_Flag | |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 glyphCount, | 456 glyphCount, |
| 456 glyphIDs, | 457 glyphIDs, |
| 457 glyphIDsCount, | 458 glyphIDsCount, |
| 458 getWidthAdvance)); | 459 getWidthAdvance)); |
| 459 } | 460 } |
| 460 } | 461 } |
| 461 | 462 |
| 462 return info; | 463 return info; |
| 463 } | 464 } |
| 464 #endif//defined(SK_BUILD_FOR_WIN32) | 465 #endif//defined(SK_BUILD_FOR_WIN32) |
| OLD | NEW |