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

Unified Diff: ui/gfx/platform_font_mac.h

Issue 2839873003: PlatformFontMac: better guess for average width (Closed)
Patch Set: as -> attr_string Created 3 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 | « no previous file | 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 12c9f5a73d43a0ee58732461af171ed43ca29e57..5b2f5beed50f9c36e41d19890235099da5912426 100644
--- a/ui/gfx/platform_font_mac.h
+++ b/ui/gfx/platform_font_mac.h
@@ -70,7 +70,9 @@ class PlatformFontMac : public PlatformFont {
int height_;
int ascent_;
int cap_height_;
- int average_width_;
+
+ // Cached average width, generated in GetExpectedTextWidth().
+ float average_width_ = 0.0;
// Details about how the font should be rendered.
FontRenderParams render_params_;
« no previous file with comments | « no previous file | ui/gfx/platform_font_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698