1 diff --git a/src/ports/SkFontMgr_win_dw.cpp b/src/ports/SkFontMgr_win_dw.cpp
2 index 6a4748f91c..50086a7780 100644
3 --- a/src/ports/SkFontMgr_win_dw.cpp
4 +++ b/src/ports/SkFontMgr_win_dw.cpp
5 @@ -361,6 +361,7 @@ static bool FindByDWriteFont(SkTypeface* cached, void* ctx) {
6 DWriteFontTypeface* cshFace = reinterpret_cast<DWriteFontTypeface*>(cached);
7 ProtoDWriteTypeface* ctxFace = reinterpret_cast<ProtoDWriteTypeface*>(ctx);
9 +#if defined(NTDDI_WIN10_RS3) && NTDDI_VERSION >= NTDDI_WIN10_RS3
10 // IDWriteFontFace5 introduced both Equals and HasVariations
11 SkTScopedComPtr<IDWriteFontFace5> cshFontFace5;
12 SkTScopedComPtr<IDWriteFontFace5> ctxFontFace5;
13 @@ -369,6 +370,7 @@ static bool FindByDWriteFont(SkTypeface* cached, void* ctx) {
14 if (cshFontFace5 && ctxFontFace5) {
15 return cshFontFace5->Equals(ctxFontFace5.get());
21 diff --git a/src/ports/SkScalerContext_win_dw.cpp b/src/ports/SkScalerContext_win_dw.cpp
22 index b2df467b22..385094e506 100644
23 --- a/src/ports/SkScalerContext_win_dw.cpp
24 +++ b/src/ports/SkScalerContext_win_dw.cpp
25 @@ -778,6 +778,7 @@ void SkScalerContext_DW::generateFontMetrics(SkFontMetrics* metrics) {
26 metrics->fFlags |= SkFontMetrics::kStrikeoutThicknessIsValid_Flag;
27 metrics->fFlags |= SkFontMetrics::kStrikeoutPositionIsValid_Flag;
29 +#if defined(NTDDI_WIN10_RS3) && NTDDI_VERSION >= NTDDI_WIN10_RS3
30 SkTScopedComPtr<IDWriteFontFace5> fontFace5;
31 if (SUCCEEDED(this->getDWriteTypeface()->fDWriteFontFace->QueryInterface(&fontFace5))) {
32 if (fontFace5->HasVariations()) {
33 @@ -785,6 +786,7 @@ void SkScalerContext_DW::generateFontMetrics(SkFontMetrics* metrics) {
34 metrics->fFlags |= SkFontMetrics::kBoundsInvalid_Flag;
39 if (this->getDWriteTypeface()->fDWriteFontFace1.get()) {
40 DWRITE_FONT_METRICS1 dwfm1;