summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-06-23 14:46:52 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-06-23 14:46:52 +0000
commita2bd32e4de06210d3afc222a098c4571e944e712 (patch)
tree4b184f543609b1c81c82332da25cf78a79b44e0b /libass
parent839c865ad862415ff2b1e24dc9d5464e4fa34bf3 (diff)
downloadmpv-a2bd32e4de06210d3afc222a098c4571e944e712.tar.bz2
mpv-a2bd32e4de06210d3afc222a098c4571e944e712.tar.xz
Reindent.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27127 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_fontconfig.c71
1 files changed, 36 insertions, 35 deletions
diff --git a/libass/ass_fontconfig.c b/libass/ass_fontconfig.c
index 3a012f5243..8da9cd6e5c 100644
--- a/libass/ass_fontconfig.c
+++ b/libass/ass_fontconfig.c
@@ -424,46 +424,47 @@ fc_instance_t* fontconfig_init(ass_library_t* library, FT_Library ftlibrary, con
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;
- }
-
- 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;
+ 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 = FcDirSave(fcs, fss, (const FcChar8 *)dir);
+ if (!rc) {
+ mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcDirSave);
+ goto ErrorFontCache;
+ }
+ ErrorFontCache:
+ ;
+ }
}
- rc = FcDirSave(fcs, fss, (const FcChar8 *)dir);
- if (!rc) {
- mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcDirSave);
- goto 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;
priv->path_default = path ? strdup(path) : 0;
priv->index_default = 0;