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

Side by Side Diff: chrome/common/gfx/chrome_font_skia.cc

Issue 40226: Fix files with lines > 80 cols. Part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/gfx/color_utils.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 "chrome/common/gfx/chrome_font.h" 5 #include "chrome/common/gfx/chrome_font.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 9
10 #include "skia/include/SkTypeface.h" 10 #include "skia/include/SkTypeface.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 int ChromeFont::baseline() const { 73 int ChromeFont::baseline() const {
74 return ascent_; 74 return ascent_;
75 } 75 }
76 76
77 int ChromeFont::ave_char_width() const { 77 int ChromeFont::ave_char_width() const {
78 return avg_width_; 78 return avg_width_;
79 } 79 }
80 80
81 ChromeFont ChromeFont::CreateFont(const std::wstring& font_name, int font_size) { 81 ChromeFont ChromeFont::CreateFont(const std::wstring& font_name,
82 int font_size) {
82 DCHECK_GT(font_size, 0); 83 DCHECK_GT(font_size, 0);
83 84
84 SkTypeface* tf = SkTypeface::Create(base::SysWideToUTF8(font_name).c_str(), 85 SkTypeface* tf = SkTypeface::Create(base::SysWideToUTF8(font_name).c_str(),
85 SkTypeface::kNormal); 86 SkTypeface::kNormal);
86 SkAutoUnref tf_helper(tf); 87 SkAutoUnref tf_helper(tf);
87 88
88 return ChromeFont(tf, font_name, font_size, NORMAL); 89 return ChromeFont(tf, font_name, font_size, NORMAL);
89 } 90 }
90 91
91 ChromeFont ChromeFont::DeriveFont(int size_delta, int style) const { 92 ChromeFont ChromeFont::DeriveFont(int size_delta, int style) const {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 return font_name_; 155 return font_name_;
155 } 156 }
156 157
157 int ChromeFont::FontSize() { 158 int ChromeFont::FontSize() {
158 return font_size_; 159 return font_size_;
159 } 160 }
160 161
161 NativeFont ChromeFont::nativeFont() const { 162 NativeFont ChromeFont::nativeFont() const {
162 return typeface_; 163 return typeface_;
163 } 164 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/gfx/color_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698