Index: src/ports/SkTypeface_win_dw.cpp |
diff --git a/src/ports/SkTypeface_win_dw.cpp b/src/ports/SkTypeface_win_dw.cpp |
index 6506118321074b611bff281e231952c097dfad42..90dc2c49adfcb316a219e41d2eaa7d15dad71b11 100644 |
--- a/src/ports/SkTypeface_win_dw.cpp |
+++ b/src/ports/SkTypeface_win_dw.cpp |
@@ -20,6 +20,7 @@ |
#include "SkOTTable_hhea.h" |
#include "SkOTTable_OS_2.h" |
#include "SkOTTable_post.h" |
+#include "SkOTUtils.h" |
#include "SkScalerContext.h" |
#include "SkScalerContext_win_dw.h" |
#include "SkTypeface_win_dw.h" |
@@ -169,10 +170,14 @@ private: |
}; |
SkTypeface::LocalizedStrings* DWriteFontTypeface::onCreateFamilyNameIterator() const { |
- SkTScopedComPtr<IDWriteLocalizedStrings> familyNames; |
- HRNM(fDWriteFontFamily->GetFamilyNames(&familyNames), "Could not obtain family names."); |
- |
- return new LocalizedStrings_IDWriteLocalizedStrings(familyNames.release()); |
+ SkTypeface::LocalizedStrings* nameIter = |
+ SkOTUtils::LocalizedStrings_NameTable::CreateForFamilyNames(*this); |
+ if (NULL == nameIter) { |
+ SkTScopedComPtr<IDWriteLocalizedStrings> familyNames; |
+ HRNM(fDWriteFontFamily->GetFamilyNames(&familyNames), "Could not obtain family names."); |
+ nameIter = new LocalizedStrings_IDWriteLocalizedStrings(familyNames.release()); |
+ } |
+ return nameIter; |
} |
int DWriteFontTypeface::onGetTableTags(SkFontTableTag tags[]) const { |