From: Grigori Goronzy Date: Thu, 18 Aug 2011 03:54:46 +0000 (+0200) Subject: Fix compilation without fontconfig X-Git-Tag: 0.13.0~28^2~100 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cce454eac1f3bee89cb7cdb8d35032917f430142;p=libass Fix compilation without fontconfig Conditionally add the fontconfig provider. We can actually run without fontconfig now! That is, if embedded fonts or fallbacks are good enough. --- diff --git a/libass/ass_fontselect.c b/libass/ass_fontselect.c index 01daa01..1de1890 100644 --- a/libass/ass_fontselect.c +++ b/libass/ass_fontselect.c @@ -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);