| Index: src/ports/SkTypeface_win_dw.cpp
|
| diff --git a/src/ports/SkTypeface_win_dw.cpp b/src/ports/SkTypeface_win_dw.cpp
|
| index 18c63a5089250747fe7e4418f44c6319d15f463f..62bf4613e7c2016401dfeabb1cf572c27ebefbc6 100644
|
| --- a/src/ports/SkTypeface_win_dw.cpp
|
| +++ b/src/ports/SkTypeface_win_dw.cpp
|
| @@ -451,12 +451,16 @@ SkAdvancedTypefaceMetrics* DWriteFontTypeface::onGetAdvancedTypefaceMetrics(
|
| finishRange(info->fGlyphWidths.get(), 0,
|
| SkAdvancedTypefaceMetrics::WidthRange::kDefault);
|
| } else {
|
| + auto fontData = fDWriteFontFace.get();
|
| + std::function<bool(int gId, int16_t* data)> getWidthAdvanceFn =
|
| + [fontData](int gId, int16_t* advance) {
|
| + return getWidthAdvance(fontData, gId, advance);
|
| + };
|
| info->fGlyphWidths.reset(
|
| - getAdvanceData(fDWriteFontFace.get(),
|
| - glyphCount,
|
| + getAdvanceData(glyphCount,
|
| glyphIDs,
|
| glyphIDsCount,
|
| - getWidthAdvance));
|
| + getWidthAdvanceFn));
|
| }
|
| }
|
|
|
|
|