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

Side by Side Diff: ui/gfx/font_list_impl.h

Issue 382273002: ui/gfx: Allow for font-specific rendering settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: diff against https://codereview.chromium.org/387743002/ Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef UI_GFX_FONT_LIST_IMPL_H_ 5 #ifndef UI_GFX_FONT_LIST_IMPL_H_
6 #define UI_GFX_FONT_LIST_IMPL_H_ 6 #define UI_GFX_FONT_LIST_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 14
15 class Font; 15 class Font;
16 struct FontRenderParams;
16 17
17 // FontListImpl is designed to provide the implementation of FontList and 18 // FontListImpl is designed to provide the implementation of FontList and
18 // intended to be used only from FontList. You must not use this class 19 // intended to be used only from FontList. You must not use this class
19 // directly. 20 // directly.
20 // 21 //
21 // FontListImpl represents a list of fonts either in the form of Font vector or 22 // FontListImpl represents a list of fonts either in the form of Font vector or
22 // in the form of a string representing font names, styles, and size. 23 // in the form of a string representing font names, styles, and size.
23 // 24 //
24 // FontListImpl could be initialized either way without conversion to the other 25 // FontListImpl could be initialized either way without conversion to the other
25 // form. The conversion to the other form is done only when asked to get the 26 // form. The conversion to the other form is done only when asked to get the
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 int GetFontStyle() const; 72 int GetFontStyle() const;
72 73
73 // Returns a string representing font names, styles, and size. If the 74 // Returns a string representing font names, styles, and size. If the
74 // FontListImpl is initialized by a vector of Font, use the first font's style 75 // FontListImpl is initialized by a vector of Font, use the first font's style
75 // and size for the description. 76 // and size for the description.
76 const std::string& GetFontDescriptionString() const; 77 const std::string& GetFontDescriptionString() const;
77 78
78 // Returns the font size in pixels. 79 // Returns the font size in pixels.
79 int GetFontSize() const; 80 int GetFontSize() const;
80 81
82 // Returns an object describing how the primary font should be rendered.
83 const FontRenderParams& GetFontRenderParams() const;
84
81 // Returns the Font vector. 85 // Returns the Font vector.
82 const std::vector<Font>& GetFonts() const; 86 const std::vector<Font>& GetFonts() const;
83 87
84 // Returns the first font in the list. 88 // Returns the first font in the list.
85 const Font& GetPrimaryFont() const; 89 const Font& GetPrimaryFont() const;
86 90
87 private: 91 private:
88 friend class base::RefCounted<FontListImpl>; 92 friend class base::RefCounted<FontListImpl>;
89 93
90 ~FontListImpl(); 94 ~FontListImpl();
(...skipping 23 matching lines...) Expand all
114 mutable int common_baseline_; 118 mutable int common_baseline_;
115 119
116 // Cached font style and size. 120 // Cached font style and size.
117 mutable int font_style_; 121 mutable int font_style_;
118 mutable int font_size_; 122 mutable int font_size_;
119 }; 123 };
120 124
121 } // namespace gfx 125 } // namespace gfx
122 126
123 #endif // UI_GFX_FONT_LIST_IMPL_H_ 127 #endif // UI_GFX_FONT_LIST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698