Index: src/ports/SkScalerContext_win_dw.cpp |
diff --git a/src/ports/SkScalerContext_win_dw.cpp b/src/ports/SkScalerContext_win_dw.cpp |
index 33ef0d55ec29a3ee7b2efbc911cc98c5441faf6d..ddf3f4ad683967f275aedbe95bb76e34dd06f601 100644 |
--- a/src/ports/SkScalerContext_win_dw.cpp |
+++ b/src/ports/SkScalerContext_win_dw.cpp |
@@ -26,7 +26,9 @@ |
#include "SkTypeface_win_dw.h" |
#include <dwrite.h> |
+#ifndef SK_IGNORE_DWRITE_1_SUPPORT |
#include <dwrite_1.h> |
+#endif |
static bool isLCD(const SkScalerContext::Rec& rec) { |
return SkMask::kLCD16_Format == rec.fMaskFormat || |
@@ -524,6 +526,7 @@ void SkScalerContext_DW::generateFontMetrics(SkPaint::FontMetrics* metrics) { |
metrics->fFlags |= SkPaint::FontMetrics::kUnderlineThinknessIsValid_Flag; |
metrics->fFlags |= SkPaint::FontMetrics::kUnderlinePositionIsValid_Flag; |
+#ifndef SK_IGNORE_DWRITE_1_SUPPORT |
if (NULL != fTypeface->fDWriteFontFace1.get()) { |
DWRITE_FONT_METRICS1 dwfm1; |
fTypeface->fDWriteFontFace1->GetMetrics(&dwfm1); |
@@ -533,7 +536,9 @@ void SkScalerContext_DW::generateFontMetrics(SkPaint::FontMetrics* metrics) { |
metrics->fXMax = fTextSizeRender * SkIntToScalar(dwfm1.glyphBoxRight) / upem; |
metrics->fMaxCharWidth = metrics->fXMax - metrics->fXMin; |
- } else { |
+ } else |
+#endif |
+ { |
AutoTDWriteTable<SkOTTableHead> head(fTypeface->fDWriteFontFace.get()); |
if (head.fExists && |
head.fSize >= sizeof(SkOTTableHead) && |