Index: libcore/FreetypeGlyphsProvider.cpp
===================================================================
--- libcore/FreetypeGlyphsProvider.cpp	(.../tags/vendor/gnash/0.8.5/EM/EM9046/PPC/gnash)	(revision 5395)
+++ libcore/FreetypeGlyphsProvider.cpp	(.../trunk/EM/EM9046/PPC/gnash)	(revision 5395)
@@ -232,6 +232,8 @@
 
 #ifdef HAVE_FONTCONFIG
 
+	const FcChar8* fullname = (const FcChar8*) name.c_str();
+  
 	if (!FcInit ())
 	{
 
@@ -242,16 +244,66 @@
 		//return false;
 	}
 	
+	// Flash seems to encode the font names as "family style",
+	// separated by space. This is usually identical to the
+	// "fullname" property encoded in the fonts.
+	// Fontconfig can't match by fullname, so we first try to
+	// match on fullname manually.
+	FcPattern* pat = FcPatternCreate ();
+	FcObjectSet* os = FcObjectSetBuild (FC_FULLNAME, 
+	    FC_FAMILY, FC_STYLE, FC_SLANT, FC_WEIGHT, FC_WIDTH, (char *) 0);
+	FcFontSet* fs = FcFontList (0, pat, os);
+	FcObjectSetDestroy (os);
+	FcPatternDestroy (pat);
+	
+	pat = NULL;
+	
+	if (fs) {
+	  FcPattern *font = NULL;
+	  
+	  for (int j = 0; j < fs->nfont; j++) {
+	    FcChar8* fn;
+	    if (FcPatternGetString (fs->fonts[j], FC_FULLNAME, 0, &fn) 
+		!= FcResultMatch)
+	      continue;
+	    if (0 == FcStrCmpIgnoreCase (fullname, fn)) {
+	      font = fs->fonts[j];
+	      break;
+	    }
+	  }
+	
+	  if (font) {
+	    pat = FcPatternCreate ();
+	    FcChar8* str;
+	    if (FcPatternGetString (font, FC_FAMILY, 0, &str) == FcResultMatch)
+	      FcPatternAddString (pat, FC_FAMILY, str);
+	    if (FcPatternGetString (font, FC_STYLE, 0, &str) == FcResultMatch)
+	      FcPatternAddString (pat, FC_STYLE, str);
+	    int val;
+	    if (FcPatternGetInteger (font, FC_SLANT, 0, &val) == FcResultMatch)
+	      FcPatternAddInteger (pat, FC_SLANT, val);
+	    if (FcPatternGetInteger (font, FC_WEIGHT, 0, &val) == FcResultMatch)
+	      FcPatternAddInteger (pat, FC_WEIGHT, val);
+	    if (FcPatternGetInteger (font, FC_WIDTH, 0, &val) == FcResultMatch)
+	      FcPatternAddInteger (pat, FC_WIDTH, val);
+	  }
+	
+	  FcFontSetDestroy(fs);
+	}
+	
 	FcResult    result;
-
-	FcPattern* pat = FcNameParse((const FcChar8*)name.c_str());
+	if (!pat) {
+	  // Only if the font couldn't be matched by fullname, we rely on
+	  // FcNameParse (which essentially matches the name as font family).
+	  pat = FcNameParse(fullname);
+	}
 	
 	FcConfigSubstitute (0, pat, FcMatchPattern);
 
 	if (italic) {
 		FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC);
 	}
-
+	
 	if (bold) {
 		FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD);
 	}
@@ -262,7 +314,7 @@
 	match = FcFontMatch (0, pat, &result);
 	FcPatternDestroy (pat);
 
-	FcFontSet* fs = NULL;
+	fs = NULL;
 	if (match)
 	{
 		fs = FcFontSetCreate ();
