Index: gfx/platform_font_mac.mm |
diff --git a/gfx/platform_font_mac.mm b/gfx/platform_font_mac.mm |
index 1fb831661e0660b1cb27ae0e5fd1790c51902027..80b9be41340c490e3b428dea42cc59131dd81d94 100644 |
--- a/gfx/platform_font_mac.mm |
+++ b/gfx/platform_font_mac.mm |
@@ -9,6 +9,7 @@ |
#include "base/basictypes.h" |
#include "base/scoped_nsobject.h" |
#include "base/sys_string_conversions.h" |
+#include "base/utf_string_conversions.h" |
#include "gfx/canvas_skia.h" |
#include "gfx/font.h" |
@@ -57,7 +58,8 @@ int PlatformFontMac::GetAverageCharacterWidth() const { |
int PlatformFontMac::GetStringWidth(const std::wstring& text) const { |
int width = 0, height = 0; |
- CanvasSkia::SizeStringInt(text, Font(const_cast<PlatformFontMac*>(this)), |
+ CanvasSkia::SizeStringInt(WideToUTF16Hack(text), |
+ Font(const_cast<PlatformFontMac*>(this)), |
&width, &height, gfx::Canvas::NO_ELLIPSIS); |
return width; |
} |