Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(682)

Side by Side Diff: ui/gfx/font_list.cc

Issue 19666006: Supports FontList in Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes examples and unittests. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "ui/gfx/font_list.h" 5 #include "ui/gfx/font_list.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 Font font(font_names[i], font_size); 223 Font font(font_names[i], font_size);
224 if (font_style == Font::NORMAL) 224 if (font_style == Font::NORMAL)
225 fonts_.push_back(font); 225 fonts_.push_back(font);
226 else 226 else
227 fonts_.push_back(font.DeriveFont(0, font_style)); 227 fonts_.push_back(font.DeriveFont(0, font_style));
228 } 228 }
229 } 229 }
230 return fonts_; 230 return fonts_;
231 } 231 }
232 232
233 const Font& FontList::GetPrimaryFont() const {
234 return GetFonts()[0];
235 }
236
233 } // namespace gfx 237 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698