diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-27 23:55:37 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-27 23:55:37 +0000 |
commit | 610ae5f3c2e8ee2bd7ecf4cbef5aaeb2ac0b1a68 (patch) | |
tree | e275e905152f02a814386ba779eb1c15e9e8dd99 /ui/gfx/font.h | |
parent | c1e45f4712de9f686e39f947c8e49eb28f352bf7 (diff) | |
download | chromium_src-610ae5f3c2e8ee2bd7ecf4cbef5aaeb2ac0b1a68.zip chromium_src-610ae5f3c2e8ee2bd7ecf4cbef5aaeb2ac0b1a68.tar.gz chromium_src-610ae5f3c2e8ee2bd7ecf4cbef5aaeb2ac0b1a68.tar.bz2 |
Change string16 to std::string in the gfx::Font() interface.
Most consumers on all platforms (including windows!) were converting the font family/GetFontName() result to UTF8. (Windows was still having to convert for the SkTypeface calls.) On Linux, we're performing a UTF16ToUTF8 on each string print (and this is showing up in pprof output.)
BUG=100803
TEST=none
Review URL: http://codereview.chromium.org/8392017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107659 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/font.h')
-rw-r--r-- | ui/gfx/font.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/gfx/font.h b/ui/gfx/font.h index cdb9542..8ded147 100644 --- a/ui/gfx/font.h +++ b/ui/gfx/font.h @@ -43,8 +43,8 @@ class UI_EXPORT Font { // object takes ownership of the PlatformFont object. explicit Font(PlatformFont* platform_font); - // Creates a font with the specified name and size in pixels. - Font(const string16& font_name, int font_size); + // Creates a font with the specified name in UTF-8 and size in pixels. + Font(const std::string& font_name, int font_size); ~Font(); @@ -85,8 +85,8 @@ class UI_EXPORT Font { // Returns the style of the font. int GetStyle() const; - // Returns the font name. - string16 GetFontName() const; + // Returns the font name in UTF-8. + std::string GetFontName() const; // Returns the font size in pixels. int GetFontSize() const; |