| Index: chrome/common/gtk_util.cc
|
| diff --git a/chrome/common/gtk_util.cc b/chrome/common/gtk_util.cc
|
| index f0d5ea1b2992f0f1bf5f8aa41039912e2de7f55a..0bef00340bf2e197097fd4eaf06c2bcc82a4171e 100644
|
| --- a/chrome/common/gtk_util.cc
|
| +++ b/chrome/common/gtk_util.cc
|
| @@ -7,6 +7,7 @@
|
| #include <gtk/gtk.h>
|
|
|
| #include "base/linux_util.h"
|
| +#include "base/logging.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
|
|
| namespace {
|
| @@ -54,4 +55,14 @@ void RemoveAllChildren(GtkWidget* container) {
|
| gtk_container_foreach(GTK_CONTAINER(container), RemoveWidget, container);
|
| }
|
|
|
| +void ForceFontSizePixels(GtkWidget* widget, double size_pixels) {
|
| + GtkStyle* style = widget->style;
|
| + PangoFontDescription* font_desc = style->font_desc;
|
| + // pango_font_description_set_absolute_size sets the font size in device
|
| + // units, which for us is pixels.
|
| + pango_font_description_set_absolute_size(font_desc,
|
| + PANGO_SCALE * size_pixels);
|
| + gtk_widget_modify_font(widget, font_desc);
|
| +}
|
| +
|
| } // namespace gtk_util
|
|
|