Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: src/ports/SkTypeface_win_dw.cpp

Issue 370463002: Remove vertical/horizontal metrics selection. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix Mac. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ports/SkScalerContext_win_dw.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/ports/SkScalerContext_win_dw.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698