summaryrefslogtreecommitdiff
path: root/pango/pango-context.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-02-19 15:48:42 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-02-19 15:48:42 +0000
commitc8f3ea5f8e99d8370248feb7585ac3b800a1a53f (patch)
tree8cfca1db518dd5f763fb83c117ef04d3e33c012d /pango/pango-context.c
parent4ab16dfd93fb4c61ba7489226ee30a66b05c8922 (diff)
downloadpango-c8f3ea5f8e99d8370248feb7585ac3b800a1a53f.tar.gz
Use 'xx' as the language for cases where we the language tag mismatches
Thu Feb 19 10:44:17 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-context.c (compute_derived_language): Use 'xx' as the language for cases where we the language tag mismatches the script but we don't have a good language tag for the script. (#123581)
Diffstat (limited to 'pango/pango-context.c')
-rw-r--r--pango/pango-context.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index 14e32041..ea6d66e4 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -872,8 +872,15 @@ compute_derived_language (PangoLanguage *lang,
else
{
derived_lang = pango_script_get_sample_language (script);
+ /* If we don't find a sample language for the script, we
+ * use a language tag that shouldn't actually be used
+ * anywhere. This keeps fontconfig (for the PangoFc*
+ * backend) from using the language tag to affect the
+ * sort order. I don't have a reference for 'xx' being
+ * safe here, though Keith Packard claims it is.
+ */
if (!derived_lang)
- derived_lang = lang;
+ derived_lang = pango_language_from_string ("xx");
}
return derived_lang;