diff options
author | Grigori Goronzy <greg@blackbox> | 2011-08-08 01:09:24 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2011-08-08 01:16:37 +0200 |
commit | dcebd5fe2a3bc278ab99bd76b66daa0915c98469 (patch) | |
tree | d957bcd037886c0cd4c23b0c7fed5bdede77a057 /libass/ass_render_api.c | |
parent | 0d391f67d3d1c87cd8e8cff907bd7c6b3b1f9cd8 (diff) | |
download | libass-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_api.c')
-rw-r--r-- | libass/ass_render_api.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libass/ass_render_api.c b/libass/ass_render_api.c index 1d8cba6..8bf9e5d 100644 --- a/libass/ass_render_api.c +++ b/libass/ass_render_api.c @@ -60,11 +60,13 @@ void ass_set_frame_size(ASS_Renderer *priv, int w, int h) void ass_set_shaper(ASS_Renderer *priv, ASS_ShapingLevel level) { +#ifdef CONFIG_HARFBUZZ // select the complex shaper for illegal values if (level == ASS_SHAPING_SIMPLE || level == ASS_SHAPING_COMPLEX) priv->settings.shaper = level; else priv->settings.shaper = ASS_SHAPING_COMPLEX; +#endif } void ass_set_margins(ASS_Renderer *priv, int t, int b, int l, int r) |