| Index: src/ports/SkFontHost_win_dw.cpp
|
| ===================================================================
|
| --- src/ports/SkFontHost_win_dw.cpp (revision 13916)
|
| +++ src/ports/SkFontHost_win_dw.cpp (working copy)
|
| @@ -1674,9 +1674,8 @@
|
|
|
| if (exists) {
|
| HR(fFontCollection->GetFontFamily(index, fontFamily));
|
| - return S_OK;
|
| }
|
| - return S_FALSE;
|
| + return S_OK;
|
| }
|
|
|
| HRESULT SkFontMgr_DirectWrite::getDefaultFontFamily(IDWriteFontFamily** fontFamily) const {
|
| @@ -1690,7 +1689,6 @@
|
| }
|
| HRM(this->getByFamilyName(metrics.lfMessageFont.lfFaceName, fontFamily),
|
| "Could not create DWrite font family from LOGFONT.");
|
| -
|
| return S_OK;
|
| }
|
|
|
| @@ -1709,6 +1707,12 @@
|
| HRNM(this->getDefaultFontFamily(&fontFamily), "Could not get default font family.");
|
| }
|
|
|
| + if (NULL == fontFamily.get()) {
|
| + // Could not obtain the default font.
|
| + HRNM(fFontCollection->GetFontFamily(0, &fontFamily),
|
| + "Could not get default-default font family.");
|
| + }
|
| +
|
| SkTScopedComPtr<IDWriteFont> font;
|
| DWRITE_FONT_WEIGHT weight = (styleBits & SkTypeface::kBold)
|
| ? DWRITE_FONT_WEIGHT_BOLD
|
|
|