OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/string_split.h" | |
10 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/strings/string_split.h" |
11 #include "ui/gfx/font_list.h" | 11 #include "ui/gfx/font_list.h" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 // Parses font description into |font_names|, |font_style| and |font_size|. | 15 // Parses font description into |font_names|, |font_style| and |font_size|. |
16 void ParseFontDescriptionString(const std::string& font_description_string, | 16 void ParseFontDescriptionString(const std::string& font_description_string, |
17 std::vector<std::string>* font_names, | 17 std::vector<std::string>* font_names, |
18 int* font_style, | 18 int* font_style, |
19 int* font_size) { | 19 int* font_size) { |
20 base::SplitString(font_description_string, ',', font_names); | 20 base::SplitString(font_description_string, ',', font_names); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 if (font_style == Font::NORMAL) | 189 if (font_style == Font::NORMAL) |
190 fonts_.push_back(font); | 190 fonts_.push_back(font); |
191 else | 191 else |
192 fonts_.push_back(font.DeriveFont(0, font_style)); | 192 fonts_.push_back(font.DeriveFont(0, font_style)); |
193 } | 193 } |
194 } | 194 } |
195 return fonts_; | 195 return fonts_; |
196 } | 196 } |
197 | 197 |
198 } // namespace gfx | 198 } // namespace gfx |
OLD | NEW |