diff -uNr pango_origin/pango/fonts.c pango_modify/pango/fonts.c
--- pango_origin/pango/fonts.c	2006-02-22 17:25:12.000000000 +0800
+++ pango_modify/pango/fonts.c	2006-03-09 17:30:30.000000000 +0800
@@ -961,14 +961,54 @@
 append_field (GString *str, const FieldMap *map, int n_elements, int val)
 {
   int i;
+  int map_style = 0;
+  
   for (i=0; i<n_elements; i++)
     {
+      if (n_elements > 1)
+	{
+	  if (!strcmp (map[1].str, "Light"))
+	  {
+	    map_style = 1;	//weight
+	  }
+        else if (!strcmp (map[1].str, "Oblique"))
+	  {
+	    map_style = 2;	//style
+	  }
+        else if (!strcmp (map[1].str, "Extra-Condensed"))
+	  {
+	    map_style = 3;	//stretch
+	  }
+        else if (!strcmp (map[1].str, "Small-Caps"))
+	  {
+	    map_style = 4;	//variant
+	  }
+	}
+      
       if (map[i].value == val)
 	{
 	  if (map[i].str)
 	    {
 	      if (str->len > 0 && str->str[str->len -1] != ' ')
 		g_string_append_c (str, ' ');
+
+	      if (map_style == 1)
+		{
+		  g_string_append (str, "weight=");
+		}	        
+	      else if (map_style == 2)
+		{
+		  g_string_append (str, "style=");
+		}  
+	      else if (map_style == 3)
+		{
+		  g_string_append (str, "stretch=");
+		}  
+	      else if (map_style == 4)
+		{
+		  g_string_append (str, "variant=");
+		}
+	      
 	      g_string_append (str, map[i].str);
 	    }
 	  return;
@@ -1056,19 +1096,77 @@
 char *
 pango_font_description_to_filename (const PangoFontDescription  *desc)
 {
-  char *result = pango_font_description_to_string (desc);
-  char *p;
+  char *p = pango_font_description_to_string (desc);
+
+  char *weight, *style, *stretch, *variant;
+  char *result, *temp;
+  int size = 0;
 
-  p = result;
+  weight = strstr (p, "weight=");
+  if (weight)
+    {
+      size += strlen ("weight=");
+    } 
+  
+  style = strstr (p, "style=");
+  if (style)
+    {
+      size += strlen ("style=");
+    } 
+  
+  stretch = strstr (p, "stretch=");
+  if (stretch)
+    {
+      size += strlen ("stretch=");
+    } 
+  
+  variant = strstr (p, "variant=");
+  if (variant)
+    {
+      size += strlen ("variant=");
+    } 
+  
+  result = g_malloc (strlen(p) - size + 1);
+  temp = result;
+  
   while (*p)
     {
-      if (strchr ("-+_.", *p) == NULL && !g_ascii_isalnum (*p))
-	*p = '_';
+      if (p == weight)
+	{
+	  p += strlen("weight=");
+	  continue;
+	}
+      else if (p == style)
+	{
+	  p += strlen("style=");
+	  continue;
+	}
+      else if (p == stretch)
+	{
+	  p += strlen("stretch=");
+	  continue;
+	}
+      else if (p == variant)
+	{
+	  p += strlen("variant=");
+	  continue;
+	}      
+      else if (strchr ("-+_.", *p) == NULL && !g_ascii_isalnum (*p))
+        {
+    	  *temp = '_';
+	  temp++;
+	}      
       else
-	*p = g_ascii_tolower (*p);
-      p++;
+        {
+	  *temp = g_ascii_tolower (*p);
+	  temp++;
+	}
+      p++;     
     }
-
+  
+  *temp = '\0';
+  g_free (p);
+  
   return result;
 }  
 
