OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/gfx/font.h" | 5 #include "ui/gfx/font.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "ui/gfx/platform_font.h" | 8 #include "ui/gfx/platform_font.h" |
9 | 9 |
10 namespace gfx { | 10 namespace gfx { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 } | 59 } |
60 | 60 |
61 int Font::GetAverageCharacterWidth() const { | 61 int Font::GetAverageCharacterWidth() const { |
62 return platform_font_->GetAverageCharacterWidth(); | 62 return platform_font_->GetAverageCharacterWidth(); |
63 } | 63 } |
64 | 64 |
65 int Font::GetStringWidth(const base::string16& text) const { | 65 int Font::GetStringWidth(const base::string16& text) const { |
66 return platform_font_->GetStringWidth(text); | 66 return platform_font_->GetStringWidth(text); |
67 } | 67 } |
68 | 68 |
| 69 float Font::GetStringWidthF(const base::string16& text) const { |
| 70 return platform_font_->GetStringWidthF(text); |
| 71 } |
| 72 |
69 int Font::GetExpectedTextWidth(int length) const { | 73 int Font::GetExpectedTextWidth(int length) const { |
70 return platform_font_->GetExpectedTextWidth(length); | 74 return platform_font_->GetExpectedTextWidth(length); |
71 } | 75 } |
72 | 76 |
73 int Font::GetStyle() const { | 77 int Font::GetStyle() const { |
74 return platform_font_->GetStyle(); | 78 return platform_font_->GetStyle(); |
75 } | 79 } |
76 | 80 |
77 std::string Font::GetFontName() const { | 81 std::string Font::GetFontName() const { |
78 return platform_font_->GetFontName(); | 82 return platform_font_->GetFontName(); |
79 } | 83 } |
80 | 84 |
81 int Font::GetFontSize() const { | 85 int Font::GetFontSize() const { |
82 return platform_font_->GetFontSize(); | 86 return platform_font_->GetFontSize(); |
83 } | 87 } |
84 | 88 |
85 NativeFont Font::GetNativeFont() const { | 89 NativeFont Font::GetNativeFont() const { |
86 return platform_font_->GetNativeFont(); | 90 return platform_font_->GetNativeFont(); |
87 } | 91 } |
88 | 92 |
89 } // namespace gfx | 93 } // namespace gfx |
OLD | NEW |