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

Side by Side Diff: app/gfx/font_skia.cc

Issue 341045: Fix up extension badge text drawing.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « app/gfx/font_mac.mm ('k') | app/gfx/font_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "app/gfx/font.h" 5 #include "app/gfx/font.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <map> 8 #include <map>
9 #include <pango/pango.h> 9 #include <pango/pango.h>
10 10
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 254
255 int Font::GetExpectedTextWidth(int length) const { 255 int Font::GetExpectedTextWidth(int length) const {
256 double char_width = const_cast<Font*>(this)->avg_width(); 256 double char_width = const_cast<Font*>(this)->avg_width();
257 return round(static_cast<float>(length) * char_width); 257 return round(static_cast<float>(length) * char_width);
258 } 258 }
259 259
260 int Font::style() const { 260 int Font::style() const {
261 return style_; 261 return style_;
262 } 262 }
263 263
264 std::wstring Font::FontName() { 264 const std::wstring& Font::FontName() const {
265 return font_family_; 265 return font_family_;
266 } 266 }
267 267
268 int Font::FontSize() { 268 int Font::FontSize() {
269 return font_size_; 269 return font_size_;
270 } 270 }
271 271
272 NativeFont Font::nativeFont() const { 272 NativeFont Font::nativeFont() const {
273 return typeface_; 273 return typeface_;
274 } 274 }
275 275
276 } // namespace gfx 276 } // namespace gfx
OLDNEW
« no previous file with comments | « app/gfx/font_mac.mm ('k') | app/gfx/font_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698