changeset 26614:875a7878626c

Move font family check to the end of the list.
author eugeni
date Fri, 02 May 2008 23:32:26 +0000
parents 92939846ff49
children 75154771f2f3
files libass/ass_fontconfig.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_fontconfig.c	Fri May 02 23:32:25 2008 +0000
+++ b/libass/ass_fontconfig.c	Fri May 02 23:32:26 2008 +0000
@@ -140,6 +140,11 @@
 		goto error;
 	*index = r_index;
 
+	result = FcPatternGetString(rpat, FC_FILE, 0, &r_file);
+	if (result != FcResultMatch)
+		goto error;
+	retval = strdup((const char*)r_file);
+
 	result = FcPatternGetString(rpat, FC_FAMILY, 0, &r_family);
 	if (result != FcResultMatch)
 		goto error;
@@ -151,11 +156,6 @@
 			       (const char*)r_family, family);
 	}
 
-	result = FcPatternGetString(rpat, FC_FILE, 0, &r_file);
-	if (result != FcResultMatch)
-		goto error;
-	
-	retval = strdup((const char*)r_file);
  error:
 	if (pat) FcPatternDestroy(pat);
 	if (fset) FcFontSetDestroy(fset);