Chromium Code Reviews| Index: content/child/dwrite_font_proxy/dwrite_font_proxy_win.cc |
| diff --git a/content/child/dwrite_font_proxy/dwrite_font_proxy_win.cc b/content/child/dwrite_font_proxy/dwrite_font_proxy_win.cc |
| index d99296ee126519db35e0e0e2f3fe9d41b003176b..b1ba345551075b9deb0fd4d9be15ec6c3c07ea42 100644 |
| --- a/content/child/dwrite_font_proxy/dwrite_font_proxy_win.cc |
| +++ b/content/child/dwrite_font_proxy/dwrite_font_proxy_win.cc |
| @@ -241,6 +241,20 @@ bool DWriteFontCollectionProxy::LoadFamily( |
| return SUCCEEDED(hr); |
| } |
| +bool DWriteFontCollectionProxy::GetFontFamily(UINT32 family_index, |
| + const base::string16& family_name, |
| + IDWriteFontFamily** font_family) { |
| + if (!CreateFamily(family_index)) |
|
ananta
2016/04/12 23:44:39
Please check for valid parameters here, especially
Ilya Kulshin
2016/04/13 01:33:28
Added a dcheck that font_family is not null and fa
|
| + return false; |
| + |
| + mswr::ComPtr<DWriteFontFamilyProxy>& family = families_[family_index]; |
| + if (!family->IsLoaded() || family->GetName().empty()) |
| + family->SetName(family_name); |
| + |
| + family.CopyTo(font_family); |
| + return true; |
| +} |
| + |
| bool DWriteFontCollectionProxy::LoadFamilyNames( |
| UINT32 family_index, |
| IDWriteLocalizedStrings** localized_strings) { |