Blob Blame History Raw
From 89ea03c4d72d1a3c4978239241300076e78b1b29 Mon Sep 17 00:00:00 2001
From: "Owen W. Taylor" <otaylor@fishsoup.net>
Date: Wed, 3 Oct 2012 15:37:28 -0400
Subject: [PATCH 5/8] pk-gtk-module: Argument pango_language_matches() must be
 canonical

The pattern passed to pango_language_matches() has to be in canonical
form - that is, lowercase with - for separators.

(Note that there was no leak before the usage of pango_languages_matches()
was introduced by 677e8ab408 - pango_language_from_string() doesn't
return an allocated result.)

https://bugs.freedesktop.org/show_bug.cgi?id=55590

Signed-off-by: Richard Hughes <richard@hughsie.com>
---
 contrib/gtk-module/pk-gtk-module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/gtk-module/pk-gtk-module.c b/contrib/gtk-module/pk-gtk-module.c
index 2c93f02..54cf08f 100644
--- a/contrib/gtk-module/pk-gtk-module.c
+++ b/contrib/gtk-module/pk-gtk-module.c
@@ -252,7 +252,7 @@ pk_pango_fc_font_map_load_fontset (PangoFontMap *font_map,
 	 * code instead of "xx"... */
 	if (G_LIKELY (language == last_language) ||
 	    language == NULL ||
-	    pango_language_matches (language, "C;xx"))
+	    pango_language_matches (language, "c;xx"))
 		return fontset;
 
 	if (G_UNLIKELY (!seen_languages))
-- 
1.7.12