Index: ui/gfx/font_list.cc |
diff --git a/ui/gfx/font_list.cc b/ui/gfx/font_list.cc |
index 3b1ab9bcd1f0a405cd300907a5bf63e7b2781160..423a6fdd8e129909b9665b9aab0bdfddbfad2b97 100644 |
--- a/ui/gfx/font_list.cc |
+++ b/ui/gfx/font_list.cc |
@@ -34,7 +34,6 @@ void ParseFontDescriptionString(const std::string& font_description_string, |
DCHECK_GT(*font_size, 0); |
font_names->pop_back(); |
- // Font supports BOLD and ITALIC; underline is supported via RenderText. |
*font_style = 0; |
for (size_t i = 0; i < styles_size.size() - 1; ++i) { |
// Styles are separated by white spaces. base::SplitString splits styles |
@@ -45,6 +44,8 @@ void ParseFontDescriptionString(const std::string& font_description_string, |
*font_style |= gfx::Font::BOLD; |
else if (!styles_size[i].compare("Italic")) |
*font_style |= gfx::Font::ITALIC; |
+ else if (!styles_size[i].compare("Underline")) |
Alexei Svitkine (slow)
2013/12/20 16:28:09
So the description string comes from a format used
Yuki
2013/12/20 17:34:52
You're right. Since underline is NOT considered a
|
+ *font_style |= gfx::Font::UNDERLINE; |
else |
NOTREACHED(); |
} |
@@ -57,6 +58,8 @@ std::string FontStyleAndSizeToString(int font_style, int font_size) { |
result += "Bold "; |
if (font_style & gfx::Font::ITALIC) |
result += "Italic "; |
+ if (font_style & gfx::Font::UNDERLINE) |
+ result += "Underline "; |
result += base::IntToString(font_size); |
result += "px"; |
return result; |