Index: src/ports/SkTypeface_win_dw.h |
diff --git a/src/ports/SkTypeface_win_dw.h b/src/ports/SkTypeface_win_dw.h |
index 465db3446bfb3cc2568ac505dc26ae1a16270990..650685825dabb6c41482928b8a03be1ae99bfd9f 100644 |
--- a/src/ports/SkTypeface_win_dw.h |
+++ b/src/ports/SkTypeface_win_dw.h |
@@ -17,7 +17,9 @@ |
#include "SkTypes.h" |
#include <dwrite.h> |
-#include <dwrite_1.h> |
+#if SK_HAS_DWRITE_1_H |
+# include <dwrite_1.h> |
+#endif |
class SkFontDescriptor; |
struct SkScalerContextRec; |
@@ -52,11 +54,13 @@ private: |
, fDWriteFont(SkRefComPtr(font)) |
, fDWriteFontFace(SkRefComPtr(fontFace)) |
{ |
+#if SK_HAS_DWRITE_1_H |
if (!SUCCEEDED(fDWriteFontFace->QueryInterface(&fDWriteFontFace1))) { |
// IUnknown::QueryInterface states that if it fails, punk will be set to NULL. |
// http://blogs.msdn.com/b/oldnewthing/archive/2004/03/26/96777.aspx |
SK_ALWAYSBREAK(NULL == fDWriteFontFace1.get()); |
} |
+#endif |
} |
public: |
@@ -66,7 +70,9 @@ public: |
SkTScopedComPtr<IDWriteFontFamily> fDWriteFontFamily; |
SkTScopedComPtr<IDWriteFont> fDWriteFont; |
SkTScopedComPtr<IDWriteFontFace> fDWriteFontFace; |
+#if SK_HAS_DWRITE_1_H |
SkTScopedComPtr<IDWriteFontFace1> fDWriteFontFace1; |
+#endif |
static DWriteFontTypeface* Create(IDWriteFactory* factory, |
IDWriteFontFace* fontFace, |