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

Unified Diff: ui/gfx/font_list.h

Issue 19666006: Supports FontList in Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/gfx/font_list.h
diff --git a/ui/gfx/font_list.h b/ui/gfx/font_list.h
index d8f5e72bb28ba9c173224814428681ffc2e72bc7..af49c9b5d89cbbb87a3215f69eb9bfc436356132 100644
--- a/ui/gfx/font_list.h
+++ b/ui/gfx/font_list.h
@@ -76,6 +76,9 @@ class UI_EXPORT FontList {
// Returns the Font vector.
const std::vector<Font>& GetFonts() const;
+ // Returns the first font in the list.
+ const Font& GetPrimaryFont() const { return GetFonts()[0]; }
+
private:
// A vector of Font. If FontList is constructed with font description string,
// |fonts_| is not initialized during construction. Instead, it is computed

Powered by Google App Engine
This is Rietveld 408576698