| Index: ui/gfx/font_fallback_win.cc
|
| diff --git a/ui/gfx/font_fallback_win.cc b/ui/gfx/font_fallback_win.cc
|
| index 4426718959b3be04a65160f23b808036d94dc64d..901feb01fb633f8483ac57604359b6979e3add9a 100644
|
| --- a/ui/gfx/font_fallback_win.cc
|
| +++ b/ui/gfx/font_fallback_win.cc
|
| @@ -12,6 +12,7 @@
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/win/registry.h"
|
| #include "ui/gfx/font.h"
|
| +#include "ui/gfx/font_fallback.h"
|
|
|
| namespace gfx {
|
|
|
| @@ -186,8 +187,6 @@ void ParseFontFamilyString(const std::string& family,
|
| }
|
| }
|
|
|
| -} // namespace internal
|
| -
|
| LinkedFontsIterator::LinkedFontsIterator(Font font)
|
| : original_font_(font),
|
| next_font_set_(false),
|
| @@ -243,4 +242,15 @@ const std::vector<Font>* LinkedFontsIterator::GetLinkedFonts() const {
|
| return fonts;
|
| }
|
|
|
| +} // namespace internal
|
| +
|
| +std::vector<std::string> GetFallbackFontFamilies(std::string font_family) {
|
| + internal::LinkedFontsIterator linked_fonts(Font(font_family, 10));
|
| + std::vector<std::string> fallback_fonts;
|
| + Font current;
|
| + while (linked_fonts.NextFont(¤t))
|
| + fallback_fonts.push_back(current.GetFontName());
|
| + return fallback_fonts;
|
| +}
|
| +
|
| } // namespace gfx
|
|
|