summaryrefslogtreecommitdiffstats
path: root/libass/ass_render.c
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2011-08-08 01:09:24 +0200
committerGrigori Goronzy <greg@blackbox>2011-08-08 01:16:37 +0200
commitdcebd5fe2a3bc278ab99bd76b66daa0915c98469 (patch)
treed957bcd037886c0cd4c23b0c7fed5bdede77a057 /libass/ass_render.c
parent0d391f67d3d1c87cd8e8cff907bd7c6b3b1f9cd8 (diff)
downloadlibass-dcebd5fe2a3bc278ab99bd76b66daa0915c98469.tar.bz2
libass-dcebd5fe2a3bc278ab99bd76b66daa0915c98469.tar.xz
Add compile time switch for HarfBuzz support
Now that it's possible to switch shapers at runtime, it also becomes a lot easier to disable them at compile time. Add ifdefs and build system changes so that HarfBuzz can be safely disabled. It's autodetected now and enabled if available. This shuffles a bit of code around, but there are no functional changes. Note that FriBidi remains mandatory for the time being, but this shouldn't pose any problems, since it is a small and very portable library without any special dependencies.
Diffstat (limited to 'libass/ass_render.c')
-rw-r--r--libass/ass_render.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 85d30b4..0bc7d38 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -77,7 +77,11 @@ ASS_Renderer *ass_renderer_init(ASS_Library *library)
priv->shaper = ass_shaper_new(0);
ass_shaper_info(library);
+#ifdef CONFIG_HARFBUZZ
priv->settings.shaper = ASS_SHAPING_COMPLEX;
+#else
+ priv->settings.shaper = ASS_SHAPING_SIMPLE;
+#endif
ass_init_exit:
if (priv)