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

Unified Diff: ui/gfx/platform_font_linux.h

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use the std::tie in resource_bundle Created 4 years, 8 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_linux.h
diff --git a/ui/gfx/platform_font_linux.h b/ui/gfx/platform_font_linux.h
index 52c4bceb76e82e590d5cd4aaa158a19a29b5b4ad..bf8fe3c61188b8309526eadff9ba906f861220e5 100644
--- a/ui/gfx/platform_font_linux.h
+++ b/ui/gfx/platform_font_linux.h
@@ -41,8 +41,11 @@ class GFX_EXPORT PlatformFontLinux : public PlatformFont {
#endif
// Overridden from PlatformFont:
- Font DeriveFont(int size_delta, int style) const override;
+ Font DeriveFont(int size_delta,
+ int style,
+ gfx::Font::Weight weight) const override;
int GetHeight() override;
+ gfx::Font::Weight GetWeight() const override;
Alexei Svitkine (slow) 2016/04/04 16:34:51 Remove gfx:: since this in gfx:: namespace. Please
Mikus 2016/04/05 16:18:34 Done.
int GetBaseline() override;
int GetCapHeight() override;
int GetExpectedTextWidth(int length) override;
@@ -58,18 +61,19 @@ class GFX_EXPORT PlatformFontLinux : public PlatformFont {
PlatformFontLinux(const skia::RefPtr<SkTypeface>& typeface,
const std::string& family,
int size_pixels,
- int style,
+ bool italic,
+ gfx::Font::Weight weight,
Alexei Svitkine (slow) 2016/04/04 16:34:51 Remove gfx::
Mikus 2016/04/05 16:18:34 Done.
const FontRenderParams& params);
~PlatformFontLinux() override;
// Initializes this object based on the passed-in details. If |typeface| is
// empty, a new typeface will be loaded.
- void InitFromDetails(
- const skia::RefPtr<SkTypeface>& typeface,
- const std::string& font_family,
- int font_size_pixels,
- int style,
- const FontRenderParams& params);
+ void InitFromDetails(const skia::RefPtr<SkTypeface>& typeface,
+ const std::string& font_family,
+ int font_size_pixels,
+ bool italic,
+ gfx::Font::Weight weight,
Alexei Svitkine (slow) 2016/04/04 16:34:51 Remove gfx::
Mikus 2016/04/05 16:18:34 Done.
+ const FontRenderParams& params);
// Initializes this object as a copy of another PlatformFontLinux.
void InitFromPlatformFont(const PlatformFontLinux* other);
@@ -83,7 +87,7 @@ class GFX_EXPORT PlatformFontLinux : public PlatformFont {
// Skia actually expects a family name and not a font name.
std::string font_family_;
int font_size_pixels_;
- int style_;
+ bool italic_;
#if defined(OS_CHROMEOS)
float device_scale_factor_;
#endif
@@ -97,6 +101,7 @@ class GFX_EXPORT PlatformFontLinux : public PlatformFont {
int height_pixels_;
int cap_height_pixels_;
double average_width_pixels_;
+ gfx::Font::Weight weight_;
#if defined(OS_CHROMEOS)
// A font description string of the format used by gfx::FontList.

Powered by Google App Engine
This is Rietveld 408576698