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

Unified Diff: ui/gfx/platform_font.h

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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.h
diff --git a/ui/gfx/platform_font.h b/ui/gfx/platform_font.h
index 58b0083c38626bac38000379e5f839016be92e4e..f52593c677c283d4b1162877ef794b0cb3c19e17 100644
--- a/ui/gfx/platform_font.h
+++ b/ui/gfx/platform_font.h
@@ -10,6 +10,7 @@
#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
#include "build/build_config.h"
+#include "ui/gfx/font.h"
#include "ui/gfx/gfx_export.h"
#include "ui/gfx/native_widget_types.h"
@@ -33,8 +34,11 @@ class GFX_EXPORT PlatformFont : public base::RefCounted<PlatformFont> {
// Returns a new Font derived from the existing font.
// |size_delta| is the size in pixels to add to the current font.
// The style parameter specifies the new style for the font, and is a
- // bitmask of the values: BOLD, ITALIC and UNDERLINE.
- virtual Font DeriveFont(int size_delta, int style) const = 0;
+ // bitmask of the values: ITALIC and UNDERLINE.
+ // The weight parameter specifies the desired weight of the font.
+ virtual Font DeriveFont(int size_delta,
+ int style,
+ gfx::Font::FontWeight weight) const = 0;
// Returns the number of vertical pixels needed to display characters from
// the specified font. This may include some leading, i.e. height may be
@@ -43,6 +47,9 @@ class GFX_EXPORT PlatformFont : public base::RefCounted<PlatformFont> {
// need to be revisited in the future.
virtual int GetHeight() = 0;
+ // Returns the font weight.
+ virtual gfx::Font::FontWeight GetWeight() = 0;
tapted 2016/03/22 04:04:17 You'll need a PlatformFontMac change for this too
msw 2016/03/22 18:24:10 Ping! Please address this comment.
Mikus 2016/03/23 17:53:21 Done.
+
// Returns the baseline, or ascent, of the font.
virtual int GetBaseline() = 0;

Powered by Google App Engine
This is Rietveld 408576698