| Index: ui/gfx/platform_font_pango.cc
|
| diff --git a/ui/gfx/platform_font_pango.cc b/ui/gfx/platform_font_pango.cc
|
| index 6da7c2dbb4efe5421fbc352496988471bc1c02d5..394363f498a0cc6d31190381b09e3f0a887a1134 100644
|
| --- a/ui/gfx/platform_font_pango.cc
|
| +++ b/ui/gfx/platform_font_pango.cc
|
| @@ -74,19 +74,19 @@ std::string* PlatformFontPango::default_font_description_ = NULL;
|
|
|
| PlatformFontPango::PlatformFontPango() {
|
| if (!default_font_) {
|
| - std::string desc_string;
|
| + scoped_ptr<ScopedPangoFontDescription> description;
|
| #if defined(OS_CHROMEOS)
|
| - // Font name must have been provided by way of SetDefaultFontDescription().
|
| CHECK(default_font_description_);
|
| - desc_string = *default_font_description_;
|
| + description.reset(
|
| + new ScopedPangoFontDescription(*default_font_description_));
|
| #else
|
| const gfx::LinuxFontDelegate* delegate = gfx::LinuxFontDelegate::instance();
|
| - desc_string = delegate ? delegate->GetDefaultFontDescription() : "sans 10";
|
| + if (delegate)
|
| + description = delegate->GetDefaultPangoFontDescription();
|
| #endif
|
| -
|
| - ScopedPangoFontDescription desc(
|
| - pango_font_description_from_string(desc_string.c_str()));
|
| - default_font_ = new Font(desc.get());
|
| + if (!description || !description->get())
|
| + description.reset(new ScopedPangoFontDescription("sans 10"));
|
| + default_font_ = new Font(description->get());
|
| }
|
|
|
| InitFromPlatformFont(
|
|
|