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

Unified Diff: ui/gfx/platform_font_win.cc

Issue 138013004: Clean-up: Renames gfx::Font's methods and removes its obsolete methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unused methods in PlatformFont. Created 6 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 | « ui/gfx/platform_font_win.h ('k') | ui/gfx/platform_font_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/platform_font_win.cc
diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc
index 5f9a137387ed35e94a52b9386447f68c79ed3559..4acaf64b34abdb2ff9abb8b0755e588741f8f1e1 100644
--- a/ui/gfx/platform_font_win.cc
+++ b/ui/gfx/platform_font_win.cc
@@ -101,7 +101,7 @@ Font PlatformFontWin::DeriveFontWithHeight(int height, int style) {
int font_height = font.GetHeight();
int font_size = font.GetFontSize();
while (font_height > height && font_size != min_font_size) {
- font = font.DeriveFont(-1, style);
+ font = font.Derive(-1, style);
if (font_height == font.GetHeight() && font_size == font.GetFontSize())
break;
font_height = font.GetHeight();
@@ -145,18 +145,9 @@ int PlatformFontWin::GetCapHeight() const {
return font_ref_->cap_height();
}
-int PlatformFontWin::GetAverageCharacterWidth() const {
- return font_ref_->ave_char_width();
-}
-
-int PlatformFontWin::GetStringWidth(const base::string16& text) const {
- return Canvas::GetStringWidth(text,
- Font(const_cast<PlatformFontWin*>(this)));
-}
-
int PlatformFontWin::GetExpectedTextWidth(int length) const {
return length * std::min(font_ref_->GetDluBaseX(),
- GetAverageCharacterWidth());
+ font_ref_->ave_char_width());
}
int PlatformFontWin::GetStyle() const {
« no previous file with comments | « ui/gfx/platform_font_win.h ('k') | ui/gfx/platform_font_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698