summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@chown.ath.cx>2011-08-18 05:54:46 +0200
committerGrigori Goronzy <greg@chown.ath.cx>2015-07-10 10:42:40 +0200
commitcce454eac1f3bee89cb7cdb8d35032917f430142 (patch)
tree2b43c3c5573e7ee98d4d898506b6c4e4c9bb2e83
parentccbf72d4077d874756304d7c627d4caeda68885f (diff)
downloadlibass-cce454eac1f3bee89cb7cdb8d35032917f430142.tar.bz2
libass-cce454eac1f3bee89cb7cdb8d35032917f430142.tar.xz
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.
-rw-r--r--libass/ass_fontselect.c4
1 files changed, 4 insertions, 0 deletions
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);