summaryrefslogtreecommitdiff
path: root/render/font.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-09 21:26:17 +0000
committerDana Jansens <danakj@orodu.net>2007-05-09 21:26:17 +0000
commitef4bec071b1b18ea937cef2da6e6ba8aebbe35c6 (patch)
treee1aeaeb7f045752143f51cfb41b981c31a4d188a /render/font.c
parenta97b2f75fb6c0180098b0fef04cbd7ab1aa8ae34 (diff)
mem leaks
Diffstat (limited to 'render/font.c')
-rw-r--r--render/font.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/render/font.c b/render/font.c
index 85aac3c4..7a6338b0 100644
--- a/render/font.c
+++ b/render/font.c
@@ -34,22 +34,13 @@
static void measure_font(const RrInstance *inst, RrFont *f)
{
PangoFontMetrics *metrics;
- gchar *locale, *p;
-
- /* get the default language from the locale
- (based on gtk_get_default_language in gtkmain.c) */
- locale = g_strdup(setlocale(LC_CTYPE, NULL));
- if ((p = strchr(locale, '.'))) *p = '\0'; /* strip off the . */
- if ((p = strchr(locale, '@'))) *p = '\0'; /* strip off the @ */
/* measure the ascent and descent */
metrics = pango_context_get_metrics(inst->pango, f->font_desc,
- pango_language_from_string(locale));
+ pango_language_get_default());
f->ascent = pango_font_metrics_get_ascent(metrics);
f->descent = pango_font_metrics_get_descent(metrics);
pango_font_metrics_unref(metrics);
-
- g_free(locale);
}
RrFont *RrFontOpen(const RrInstance *inst, const gchar *name, gint size,