| 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 SkAdvancedTypefaceMetrics::WidthRange range(0); | 445 SkAdvancedTypefaceMetrics::WidthRange range(0); |
| 446 int16_t advance; | 446 int16_t advance; |
| 447 getWidthAdvance(fDWriteFontFace.get(), 1, &advance); | 447 getWidthAdvance(fDWriteFontFace.get(), 1, &advance); |
| 448 range.fAdvance.append(1, &advance); | 448 range.fAdvance.append(1, &advance); |
| 449 SkAdvancedTypefaceMetrics::FinishRange( | 449 SkAdvancedTypefaceMetrics::FinishRange( |
| 450 &range, 0, SkAdvancedTypefaceMetrics::WidthRange::kDefault); | 450 &range, 0, SkAdvancedTypefaceMetrics::WidthRange::kDefault); |
| 451 info->fGlyphWidths.emplace_back(std::move(range)); | 451 info->fGlyphWidths.emplace_back(std::move(range)); |
| 452 } else { | 452 } else { |
| 453 IDWriteFontFace* borrowedFontFace = fDWriteFontFace.get(); | 453 IDWriteFontFace* borrowedFontFace = fDWriteFontFace.get(); |
| 454 info->setGlyphWidths( | 454 info->setGlyphWidths( |
| 455 glyphCount, glyphIDs, glyphIDsCount, | 455 glyphCount, |
| 456 SkAdvancedTypefaceMetrics::GetAdvance( | 456 glyphIDs, |
| 457 [borrowedFontFace](int gId, int16_t* data) { | 457 glyphIDsCount, |
| 458 return getWidthAdvance(borrowedFontFace, gId, da
ta); | 458 SkAdvancedTypefaceMetrics::GetAdvance([borrowedFontFace](int gId
, int16_t* data) { |
| 459 })); | 459 return getWidthAdvance(borrowedFontFace, gId, data); |
| 460 }) |
| 461 ); |
| 460 } | 462 } |
| 461 } | 463 } |
| 462 | 464 |
| 463 return info; | 465 return info; |
| 464 } | 466 } |
| 465 #endif//defined(SK_BUILD_FOR_WIN32) | 467 #endif//defined(SK_BUILD_FOR_WIN32) |
| OLD | NEW |