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

Unified Diff: ui/gfx/platform_font_ios.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/platform_font.h ('k') | ui/gfx/platform_font_ios.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/platform_font_ios.h
diff --git a/ui/gfx/platform_font_ios.h b/ui/gfx/platform_font_ios.h
index 5cc1224c0adf8bbdc2995d8397fe0021e1289456..ffaaac0cfef7116e84e69377b23b3ac405c1551b 100644
--- a/ui/gfx/platform_font_ios.h
+++ b/ui/gfx/platform_font_ios.h
@@ -18,8 +18,11 @@ class PlatformFontIOS : public PlatformFont {
int font_size);
// Overridden from PlatformFont:
- Font DeriveFont(int size_delta, int style) const override;
+ Font DeriveFont(int size_delta,
+ int style,
+ Font::Weight weight) const override;
int GetHeight() override;
+ Font::Weight GetWeight() const override;
int GetBaseline() override;
int GetCapHeight() override;
int GetExpectedTextWidth(int length) override;
@@ -31,13 +34,17 @@ class PlatformFontIOS : public PlatformFont {
NativeFont GetNativeFont() const override;
private:
- PlatformFontIOS(const std::string& font_name, int font_size, int style);
+ PlatformFontIOS(const std::string& font_name,
+ int font_size,
+ int style,
+ Font::Weight weight);
~PlatformFontIOS() override {}
// Initialize the object with the specified parameters.
void InitWithNameSizeAndStyle(const std::string& font_name,
int font_size,
- int style);
+ int style,
+ Font::Weight weight);
// Calculate and cache the font metrics.
void CalculateMetrics();
@@ -45,6 +52,7 @@ class PlatformFontIOS : public PlatformFont {
std::string font_name_;
int font_size_;
int style_;
+ Font::Weight weight_;
// Cached metrics, generated at construction.
int height_;
« no previous file with comments | « ui/gfx/platform_font.h ('k') | ui/gfx/platform_font_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698