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

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: Add a lost comment and modify a render text unittest to not test black because of test env font con… Created 4 years, 7 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
« no previous file with comments | « ui/gfx/linux_font_delegate.h ('k') | ui/gfx/platform_font_ios.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/platform_font.h
diff --git a/ui/gfx/platform_font.h b/ui/gfx/platform_font.h
index 58b0083c38626bac38000379e5f839016be92e4e..48e14cf99608ad0fb52cae9b2ef6b2763cb99f2f 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,
+ Font::Weight 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 Font::Weight GetWeight() const = 0;
+
// Returns the baseline, or ascent, of the font.
virtual int GetBaseline() = 0;
« no previous file with comments | « ui/gfx/linux_font_delegate.h ('k') | ui/gfx/platform_font_ios.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698