diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2006-05-22 17:08:13 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-05-22 17:08:13 +0000 |
commit | fb3eeb868689df25cc8fa56ed8471f1b880bb1c1 (patch) | |
tree | 6a85aa08bda28a76234bfe58642fda07768f2c75 /gdk/gdkpango.c | |
parent | 4636fa7efe134441db9b48a5ba029a99cb82fcf8 (diff) | |
download | gtk+-fb3eeb868689df25cc8fa56ed8471f1b880bb1c1.tar.gz |
Rollback the following changes, to fix it the proper way in Pango:
2006-05-22 Behdad Esfahbod <behdad@gnome.org>
Rollback the following changes, to fix it the proper way in Pango:
* gdk/gdkinternals.h:
* gdk/gdkscreen.c (gdk_screen_class_init), (gdk_screen_finalize),
(update_fontmap_resolution), (gdk_screen_set_resolution): Add new
function _gdk_screen_get_font_map() and have one fontmap per screen,
with the correct resolution set on it.
* gdk/gdkpango.c (gdk_pango_context_get_for_screen): Use
_gdk_screen_get_font_map() instead of setting resolution on the
PangoCairoContext. (#342529)
Diffstat (limited to 'gdk/gdkpango.c')
-rw-r--r-- | gdk/gdkpango.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdk/gdkpango.c b/gdk/gdkpango.c index 984881aeea..9375a80545 100644 --- a/gdk/gdkpango.c +++ b/gdk/gdkpango.c @@ -1416,16 +1416,20 @@ gdk_pango_context_get_for_screen (GdkScreen *screen) PangoFontMap *fontmap; PangoContext *context; const cairo_font_options_t *options; + double dpi; g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL); - fontmap = _gdk_screen_get_font_map (screen); + fontmap = pango_cairo_font_map_get_default (); context = pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (fontmap)); options = gdk_screen_get_font_options (screen); pango_cairo_context_set_font_options (context, options); + dpi = gdk_screen_get_resolution (screen); + pango_cairo_context_set_resolution (context, dpi); + return context; } |