Index: ui/gfx/font_list.cc |
diff --git a/ui/gfx/font_list.cc b/ui/gfx/font_list.cc |
index 3b1ab9bcd1f0a405cd300907a5bf63e7b2781160..1ec36dc3e7a72c33b14bb7a6f773050bfdf716d8 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 has already |
Alexei Svitkine (slow)
2013/12/20 17:52:19
Nit: it has -> it's
Yuki
2013/12/24 05:55:17
Done.
|
+ // 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()); |