]> granicus.if.org Git - libass/commitdiff
Fix compilation without fontconfig
authorGrigori Goronzy <greg@chown.ath.cx>
Thu, 18 Aug 2011 03:54:46 +0000 (05:54 +0200)
committerGrigori Goronzy <greg@chown.ath.cx>
Fri, 10 Jul 2015 08:42:40 +0000 (10:42 +0200)
Conditionally add the fontconfig provider. We can actually run
without fontconfig now! That is, if embedded fonts or fallbacks are
good enough.

libass/ass_fontselect.c

index 01daa01ac2cbe70b8b9c13f32c4c8f2000270d5d..1de18905e9a690ab370589cb1ccb6674a05e0bb6 100644 (file)
@@ -629,8 +629,10 @@ ass_fontselect_init(ASS_Library *library,
     priv->embedded_provider = ass_embedded_fonts_add_provider(library, priv,
             ftlibrary);
 
+#ifdef CONFIG_FONTCONFIG
     // XXX: for now, always add the fontconfig provider
     priv->default_provider = ass_fontconfig_add_provider(library, priv, NULL);
+#endif
 
     return priv;
 }
@@ -663,7 +665,9 @@ void ass_fontselect_free(ASS_FontSelector *priv)
 
     // TODO: we should track all child font providers and
     // free them here
+#ifdef CONFIG_FONTCONFIG
     ass_font_provider_free(priv->default_provider);
+#endif
     ass_font_provider_free(priv->embedded_provider);
 
     free(priv);