summaryrefslogtreecommitdiff
path: root/pango/pango-context.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-05-23 22:16:16 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-05-23 22:16:16 +0000
commit48c98597fb8bc2b779500670d20486855681b202 (patch)
treee481e4492e97ee12e432b2f568efe0b3ab37e854 /pango/pango-context.c
parentd9a95159137597e58613d8b8f7a9af472e4953c2 (diff)
downloadpango-48c98597fb8bc2b779500670d20486855681b202.tar.gz
Part of Bug 440603 – Minor ABI change
2007-05-23 Behdad Esfahbod <behdad@gnome.org> Part of Bug 440603 – Minor ABI change * pango/pango-context.c (pango_context_init), (pango_context_set_language), (pango_context_get_language): Make itemization use pango_language_get_default() if context has no language set on it. Ditto for pango_context_get_metrics() if both input language and context language are NULL. svn path=/trunk/; revision=2317
Diffstat (limited to 'pango/pango-context.c')
-rw-r--r--pango/pango-context.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index ff667b14..6f588191 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -34,6 +34,7 @@ struct _PangoContext
{
GObject parent_instance;
+ PangoLanguage *set_language;
PangoLanguage *language;
PangoDirection base_dir;
PangoGravity base_gravity;
@@ -64,7 +65,8 @@ pango_context_init (PangoContext *context)
context->resolved_gravity = context->base_gravity = PANGO_GRAVITY_SOUTH;
context->gravity_hint = PANGO_GRAVITY_HINT_NATURAL;
- context->language = NULL;
+ context->set_language = NULL;
+ context->language = pango_language_get_default ();
context->font_map = NULL;
context->font_desc = pango_font_description_new ();
@@ -363,7 +365,11 @@ pango_context_set_language (PangoContext *context,
{
g_return_if_fail (context != NULL);
- context->language = language;
+ context->set_language = language;
+ if (language)
+ context->language = language;
+ else
+ context->language = pango_language_get_default ();
}
/**
@@ -379,7 +385,7 @@ pango_context_get_language (PangoContext *context)
{
g_return_val_if_fail (context != NULL, NULL);
- return context->language;
+ return context->set_language;
}
/**