summaryrefslogtreecommitdiffstats
path: root/libass/ass.h
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2011-08-08 00:22:32 +0200
committerGrigori Goronzy <greg@blackbox>2011-08-08 00:22:32 +0200
commit0d391f67d3d1c87cd8e8cff907bd7c6b3b1f9cd8 (patch)
tree8a7b2c0d04cb490c94c9b45be9cafeaa5fc19788 /libass/ass.h
parent37fe952c045963c8c86bc630b6a673df9d728dcc (diff)
downloadlibass-0d391f67d3d1c87cd8e8cff907bd7c6b3b1f9cd8.tar.bz2
libass-0d391f67d3d1c87cd8e8cff907bd7c6b3b1f9cd8.tar.xz
Runtime shaper selection
Add an API call, ass_set_shaper, and infrastructure to make shapers selectable at runtime. Currently, this allows to switch between two shapers: a SIMPLE shaper that maps to FriBidi and a COMPLEX shaper that maps to HarfBuzz.
Diffstat (limited to 'libass/ass.h')
-rw-r--r--libass/ass.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libass/ass.h b/libass/ass.h
index 57faf7d..4986437 100644
--- a/libass/ass.h
+++ b/libass/ass.h
@@ -61,6 +61,19 @@ typedef enum {
} ASS_Hinting;
/**
+ * \brief Text shaping levels.
+ *
+ * SIMPLE is a fast, font-agnostic shaper that can do only substitutions.
+ * COMPLEX is a slower shaper using OpenType for substitutions and positioning.
+ *
+ * libass uses the best shaper available by default.
+ */
+typedef enum {
+ ASS_SHAPING_SIMPLE = 0,
+ ASS_SHAPING_COMPLEX
+} ASS_ShapingLevel;
+
+/**
* \brief Initialize the library.
* \return library handle or NULL if failed
*/
@@ -147,6 +160,13 @@ void ass_renderer_done(ASS_Renderer *priv);
void ass_set_frame_size(ASS_Renderer *priv, int w, int h);
/**
+ * \brief Set shaping level. This is merely a hint, the renderer will use
+ * whatever is available if the request cannot be fulfilled.
+ * \param level shaping level
+ */
+void ass_set_shaper(ASS_Renderer *priv, ASS_ShapingLevel level);
+
+/**
* \brief Set frame margins. These values may be negative if pan-and-scan
* is used.
* \param priv renderer handle