Use portable code for family names with DirectWrite.

IDWriteFamily::GetFamilyNames appears to be 'helpful' and removes
parts of family names that look like style names. Since the iterator
is supposed to return the actual names and not just the name the
platform thinks the name is (as getFamilyName does), try returning
the raw names when possible.

BUG=skia:4217

Review URL: https://codereview.chromium.org/1302573002
diff --git a/src/ports/SkTypeface_win_dw.cpp b/src/ports/SkTypeface_win_dw.cpp
index 6506118..90dc2c4 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 @@
 };
 
 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 {