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

Unified Diff: ui/gfx/platform_font_mac.h

Issue 2222483002: Mac: Fix PlatformFontMac::DeriveFont. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@font_mac
Patch Set: Created 4 years, 4 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/font_unittest.cc ('k') | ui/gfx/platform_font_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/platform_font_mac.h
diff --git a/ui/gfx/platform_font_mac.h b/ui/gfx/platform_font_mac.h
index 63a0cbd2bbf05d8aa94ea46e661d77a13df3212e..12c9f5a73d43a0ee58732461af171ed43ca29e57 100644
--- a/ui/gfx/platform_font_mac.h
+++ b/ui/gfx/platform_font_mac.h
@@ -41,6 +41,13 @@ class PlatformFontMac : public PlatformFont {
int font_size,
int font_style,
Font::Weight font_weight);
+
+ PlatformFontMac(NativeFont font,
+ const std::string& font_name,
+ int font_size,
+ int font_style,
+ Font::Weight font_weight);
+
~PlatformFontMac() override;
// Calculates and caches the font metrics and inits |render_params_|.
@@ -54,10 +61,10 @@ class PlatformFontMac : public PlatformFont {
// The name/size/style trio that specify the font. Initialized in the
// constructors.
- std::string font_name_; // Corresponds to -[NSFont fontFamily].
- int font_size_;
- int font_style_;
- Font::Weight font_weight_;
+ const std::string font_name_; // Corresponds to -[NSFont fontFamily].
+ const int font_size_;
+ const int font_style_;
+ const Font::Weight font_weight_;
// Cached metrics, generated in CalculateMetrics().
int height_;
« no previous file with comments | « ui/gfx/font_unittest.cc ('k') | ui/gfx/platform_font_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698