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

Unified Diff: ui/gfx/platform_font_pango.cc

Issue 9111042: Fix RTL and complex script title in print preview header/footer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use RenderText instead Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ui/gfx/platform_font_pango.cc
diff --git a/ui/gfx/platform_font_pango.cc b/ui/gfx/platform_font_pango.cc
index 503782908e3b7eeac5f8d310cf3a2b4f810c1718..be5aabe473b56ccc780f284e0d7f19c38699c225 100644
--- a/ui/gfx/platform_font_pango.cc
+++ b/ui/gfx/platform_font_pango.cc
@@ -101,6 +101,9 @@ std::string GetDefaultFont() {
#endif // defined(OS_CHROMEOS)
#else
GtkSettings* settings = gtk_settings_get_default();
+ if (settings == NULL) { // Probably caused by sandbox, give a default.
+ return "sans 10";
+ }
gchar* font_name = NULL;
g_object_get(settings, "gtk-font-name", &font_name, NULL);

Powered by Google App Engine
This is Rietveld 408576698