summaryrefslogtreecommitdiff
path: root/pango/pangoxft-font.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2005-11-22 20:19:15 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2005-11-22 20:19:15 +0000
commit550026ab7e2d2cfeeacd1cd68ecb1ac31a4733e4 (patch)
treede28c0dd5608ad100b5d88a92e343fa018b2c58f /pango/pangoxft-font.c
parent9767e78aac25bf22ea759fdcf35ffaab487cfe48 (diff)
downloadpango-550026ab7e2d2cfeeacd1cd68ecb1ac31a4733e4.tar.gz
Load a font suitable for viewing English text when creating mini font for
2005-11-22 Behdad Esfahbod <behdad@gnome.org> * pango/pangoxft-font.c (_pango_xft_font_get_mini_font): Load a font suitable for viewing English text when creating mini font for hex boxes. (#312477)
Diffstat (limited to 'pango/pangoxft-font.c')
-rw-r--r--pango/pangoxft-font.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c
index 7bcfe1b5..7fd35bf4 100644
--- a/pango/pangoxft-font.c
+++ b/pango/pangoxft-font.c
@@ -129,14 +129,19 @@ _pango_xft_font_get_mini_font (PangoXftFont *xfont)
if (!xfont->mini_font)
{
Display *display;
+ int screen;
PangoFontDescription *desc = pango_font_description_new ();
+ PangoContext *context;
int i;
int width = 0, height = 0;
XGlyphInfo extents;
XftFont *mini_xft;
int new_size;
- _pango_xft_font_map_get_info (fcfont->fontmap, &display, NULL);
+ _pango_xft_font_map_get_info (fcfont->fontmap, &display, &screen);
+
+ context = pango_xft_get_context (display, screen);
+ pango_context_set_language (context, pango_language_from_string ("en"));
pango_font_description_set_family_static (desc, "monospace");
@@ -147,8 +152,10 @@ _pango_xft_font_get_mini_font (PangoXftFont *xfont)
else
pango_font_description_set_size (desc, new_size);
- xfont->mini_font = pango_font_map_load_font (fcfont->fontmap, NULL, desc);
+ xfont->mini_font = pango_font_map_load_font (fcfont->fontmap, context, desc);
+
pango_font_description_free (desc);
+ g_object_unref (context);
mini_xft = xft_font_get_font (xfont->mini_font);