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

Unified Diff: ui/gfx/platform_font_pango.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 side-by-side diff with in-line comments
Download patch
Index: ui/gfx/platform_font_pango.h
diff --git a/ui/gfx/platform_font_pango.h b/ui/gfx/platform_font_pango.h
index 3c3b46af29637dc58fae706fab589df447c1969b..3e48d15841317ea162d8a411108428c7b7b3851d 100644
--- a/ui/gfx/platform_font_pango.h
+++ b/ui/gfx/platform_font_pango.h
@@ -11,6 +11,7 @@
#include "base/memory/scoped_ptr.h"
#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkRefCnt.h"
+#include "ui/gfx/font_render_params.h"
#include "ui/gfx/platform_font.h"
class SkTypeface;
@@ -55,6 +56,7 @@ class GFX_EXPORT PlatformFontPango : public PlatformFont {
virtual std::string GetFontName() const OVERRIDE;
virtual std::string GetActualFontNameForTesting() const OVERRIDE;
virtual int GetFontSize() const OVERRIDE;
+ virtual const FontRenderParams& GetFontRenderParams() const OVERRIDE;
virtual NativeFont GetNativeFont() const OVERRIDE;
private:
@@ -63,7 +65,8 @@ class GFX_EXPORT PlatformFontPango : public PlatformFont {
PlatformFontPango(const skia::RefPtr<SkTypeface>& typeface,
const std::string& name,
int size,
msw 2014/07/12 00:27:33 nit: denote if this is pixel or point size in the
Daniel Erat 2014/07/12 01:55:33 renamed
- int style);
+ int style,
+ const FontRenderParams& params);
virtual ~PlatformFontPango();
// Initializes this object based on the passed-in details. If |typeface| is
@@ -72,7 +75,8 @@ class GFX_EXPORT PlatformFontPango : public PlatformFont {
const skia::RefPtr<SkTypeface>& typeface,
const std::string& font_family,
int font_size,
msw 2014/07/12 00:27:33 nit: denote if this is pixel or point size in the
Daniel Erat 2014/07/12 01:55:33 renamed
- int style);
+ int style,
+ const FontRenderParams& params);
// Initializes this object as a copy of another PlatformFontPango.
void InitFromPlatformFont(const PlatformFontPango* other);
@@ -91,12 +95,15 @@ class GFX_EXPORT PlatformFontPango : public PlatformFont {
skia::RefPtr<SkTypeface> typeface_;
- // Additional information about the face
+ // Additional information about the face.
// Skia actually expects a family name and not a font name.
std::string font_family_;
int font_size_pixels_;
int style_;
+ // Information describing how the font should be rendered.
+ FontRenderParams font_render_params_;
+
// Cached metrics, generated at construction.
int ascent_pixels_;
int height_pixels_;

Powered by Google App Engine
This is Rietveld 408576698