| Index: ui/gfx/font_list.cc
|
| diff --git a/ui/gfx/font_list.cc b/ui/gfx/font_list.cc
|
| index 3b1ab9bcd1f0a405cd300907a5bf63e7b2781160..e977882bed90ea4d96a30e8e4859e4423839ca8e 100644
|
| --- a/ui/gfx/font_list.cc
|
| +++ b/ui/gfx/font_list.cc
|
| @@ -254,8 +254,15 @@ const std::vector<Font>& FontList::GetFonts() const {
|
| DCHECK(!font_description_string_.empty());
|
|
|
| std::vector<std::string> font_names;
|
| + // It's possible that gfx::Font::UNDERLINE is specified and it's already
|
| + // stored in |font_style_| but |font_description_string_| doesn't have the
|
| + // underline info. So we should respect |font_style_| as long as it's
|
| + // valid.
|
| + int style = 0;
|
| ParseFontDescriptionString(font_description_string_, &font_names,
|
| - &font_style_, &font_size_);
|
| + &style, &font_size_);
|
| + if (font_style_ == -1)
|
| + font_style_ = style;
|
| for (size_t i = 0; i < font_names.size(); ++i) {
|
| DCHECK(!font_names[i].empty());
|
|
|
|
|