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

Unified Diff: ui/gfx/platform_font_pango.cc

Issue 25039002: Always aligns text at vertically center (Textfield, Label). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 7 years, 2 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/render_text.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/platform_font_pango.cc
diff --git a/ui/gfx/platform_font_pango.cc b/ui/gfx/platform_font_pango.cc
index 856acc2c432a209b0e451bfa86c8883db92d7e90..020cc7f2291f3c030355b5db8ad3ca3f6a7934ec 100644
--- a/ui/gfx/platform_font_pango.cc
+++ b/ui/gfx/platform_font_pango.cc
@@ -183,13 +183,13 @@ int PlatformFontPango::GetBaseline() const {
}
int PlatformFontPango::GetCapHeight() const {
- // Return the height as an approximation because Pango doesn't support cap
+ // Return the ascent as an approximation because Pango doesn't support cap
// height.
// TODO(yukishiino): Come up with a better approximation of cap height, or
// support cap height metrics. Another option is to have a hard-coded table
// of cap height for major fonts used in Chromium/Chrome.
// See http://crbug.com/249507
- return height_pixels_;
+ return ascent_pixels_;
}
int PlatformFontPango::GetAverageCharacterWidth() const {
« no previous file with comments | « ui/gfx/font_unittest.cc ('k') | ui/gfx/render_text.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698