changeset 20105:bcb586a0800c

Avoid crash with fontconfig 2.3.9x (as shipped with SuSE 10.1, FcDirScan is broken) and warn that these are beta versions and not supported.
author reimar
date Sun, 08 Oct 2006 13:01:14 +0000
parents 870de35ae3c4
children 9cf5eb21064e
files libass/ass_fontconfig.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_fontconfig.c	Sun Oct 08 13:01:03 2006 +0000
+++ b/libass/ass_fontconfig.c	Sun Oct 08 13:01:14 2006 +0000
@@ -175,8 +175,12 @@
 	if (FcDirCacheValid((const FcChar8 *)dir) == FcFalse)
 	{
 		mp_msg(MSGT_GLOBAL, MSGL_INFO, "[ass] Updating font cache\n");
+		if (FcGetVersion() >= 20390 && FcGetVersion() < 20400)
+			mp_msg(MSGT_GLOBAL, MSGL_WARN,
+			       "[ass] beta versions of fontconfig are not supported\n"
+			       "      update before reporting any bugs\n");
 		// FontConfig >= 2.4.0 updates cache automatically in FcConfigAppFontAddDir()
-		if (FcGetVersion() < 20400) {
+		if (FcGetVersion() < 20390) {
 			FcFontSet* fcs;
 			FcStrSet* fss;
 			fcs = FcFontSetCreate();