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

Unified Diff: chrome/common/gfx/chrome_font_win.cc

Issue 28181: A fix for Issue 4400 (or maybe 4222).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/gfx/chrome_font_win.cc
===================================================================
--- chrome/common/gfx/chrome_font_win.cc (revision 10454)
+++ chrome/common/gfx/chrome_font_win.cc (working copy)
@@ -43,7 +43,7 @@
}
int ChromeFont::GetExpectedTextWidth(int length) const {
- return length * font_ref_->dlu_base_x();
+ return length * std::min(font_ref_->dlu_base_x(), ave_char_width());
}
int ChromeFont::style() const {
@@ -75,7 +75,7 @@
// static
ChromeFont::HFontRef* ChromeFont::GetBaseFontRef() {
if (base_font_ref_ == NULL) {
- NONCLIENTMETRICS metrics;
+ NONCLIENTMETRICS metrics;
win_util::GetNonClientMetrics(&metrics);
// See comment in ChromeFont::DeriveFont() about font size.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698