[MPlayer-cvslog] r27127 - trunk/libass/ass_fontconfig.c

eugeni subversion at mplayerhq.hu
Mon Jun 23 16:46:52 CEST 2008


Author: eugeni
Date: Mon Jun 23 16:46:52 2008
New Revision: 27127

Log:
Reindent.


Modified:
   trunk/libass/ass_fontconfig.c

Modified: trunk/libass/ass_fontconfig.c
==============================================================================
--- trunk/libass/ass_fontconfig.c	(original)
+++ trunk/libass/ass_fontconfig.c	Mon Jun 23 16:46:52 2008
@@ -424,44 +424,45 @@ fc_instance_t* fontconfig_init(ass_libra
 		process_fontdata(priv, library, ftlibrary, i);
 
 	if (dir) {
-	if (FcDirCacheValid((const FcChar8 *)dir) == FcFalse)
-	{
-		mp_msg(MSGT_ASS, MSGL_INFO, MSGTR_LIBASS_UpdatingFontCache);
-		if (FcGetVersion() >= 20390 && FcGetVersion() < 20400)
-			mp_msg(MSGT_ASS, MSGL_WARN,
-			       MSGTR_LIBASS_BetaVersionsOfFontconfigAreNotSupported);
-		// FontConfig >= 2.4.0 updates cache automatically in FcConfigAppFontAddDir()
-		if (FcGetVersion() < 20390) {
-			FcFontSet* fcs;
-			FcStrSet* fss;
-			fcs = FcFontSetCreate();
-			fss = FcStrSetCreate();
-			rc = FcStrSetAdd(fss, (const FcChar8*)dir);
-			if (!rc) {
-				mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcStrSetAddFailed);
-				goto ErrorFontCache;
-			}
+		if (FcDirCacheValid((const FcChar8 *)dir) == FcFalse)
+			{
+				mp_msg(MSGT_ASS, MSGL_INFO, MSGTR_LIBASS_UpdatingFontCache);
+				if (FcGetVersion() >= 20390 && FcGetVersion() < 20400)
+					mp_msg(MSGT_ASS, MSGL_WARN,
+					       MSGTR_LIBASS_BetaVersionsOfFontconfigAreNotSupported);
+				// FontConfig >= 2.4.0 updates cache automatically in FcConfigAppFontAddDir()
+				if (FcGetVersion() < 20390) {
+					FcFontSet* fcs;
+					FcStrSet* fss;
+					fcs = FcFontSetCreate();
+					fss = FcStrSetCreate();
+					rc = FcStrSetAdd(fss, (const FcChar8*)dir);
+					if (!rc) {
+						mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcStrSetAddFailed);
+						goto ErrorFontCache;
+					}
 
-			rc = FcDirScan(fcs, fss, NULL, FcConfigGetBlanks(priv->config), (const FcChar8 *)dir, FcFalse);
-			if (!rc) {
-				mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcDirScanFailed);
-				goto ErrorFontCache;
-			}
+					rc = FcDirScan(fcs, fss, NULL, FcConfigGetBlanks(priv->config),
+						       (const FcChar8 *)dir, FcFalse);
+					if (!rc) {
+						mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcDirScanFailed);
+						goto ErrorFontCache;
+					}
 
-			rc = FcDirSave(fcs, fss, (const FcChar8 *)dir);
-			if (!rc) {
-				mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcDirSave);
-				goto ErrorFontCache;
+					rc = FcDirSave(fcs, fss, (const FcChar8 *)dir);
+					if (!rc) {
+						mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcDirSave);
+						goto ErrorFontCache;
+					}
+				ErrorFontCache:
+					;
+				}
 			}
-		ErrorFontCache:
-			;
-		}
-	}
 
-	rc = FcConfigAppFontAddDir(priv->config, (const FcChar8*)dir);
-	if (!rc) {
-		mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcConfigAppFontAddDirFailed);
-	}
+		rc = FcConfigAppFontAddDir(priv->config, (const FcChar8*)dir);
+		if (!rc) {
+			mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcConfigAppFontAddDirFailed);
+		}
 	}
 
 	priv->family_default = family ? strdup(family) : 0;



More information about the MPlayer-cvslog mailing list