summaryrefslogtreecommitdiffstats
path: root/libass/ass.h
diff options
context:
space:
mode:
authorOneric <oneric@oneric.stub>2021-03-13 02:20:18 +0100
committerOneric <oneric@oneric.stub>2022-08-19 19:16:33 +0200
commit334e5565c688c0a2a0172c9007e76dffaca238d8 (patch)
tree83e1b55be9269debfc49cfacdba642b16cc714a8 /libass/ass.h
parent169862065a70bedd202bce3c2f92f0e880f70029 (diff)
downloadlibass-334e5565c688c0a2a0172c9007e76dffaca238d8.tar.bz2
libass-334e5565c688c0a2a0172c9007e76dffaca238d8.tar.xz
Add WRAP_UNICODE feature
Setting this feature allows breaking lines according to the Unicode Line Breaking Algorithm and is incompatible with VSFilter. This is useful for non-ASS renderers utilising libass, especially for languages typically not using ASCII-spaces to separate words, but also to correctly break on punctuation even in languages that do. It does not allow breaking words apart, so line overflow might still occur. For this to work a new optional dependency on libunibrak is added. We assume FriBidi's and libunibreak's utf32/glyph type match. This is based on an earlier patch by GitHub user siikamiika.
Diffstat (limited to 'libass/ass.h')
-rw-r--r--libass/ass.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/libass/ass.h b/libass/ass.h
index 85dc1fe..f0e54bc 100644
--- a/libass/ass.h
+++ b/libass/ass.h
@@ -24,7 +24,7 @@
#include <stdarg.h>
#include "ass_types.h"
-#define LIBASS_VERSION 0x01600000
+#define LIBASS_VERSION 0x01600010
#ifdef __cplusplus
extern "C" {
@@ -266,6 +266,19 @@ typedef enum {
*/
ASS_FEATURE_WHOLE_TEXT_LAYOUT,
+ /**
+ * Break lines according to the Unicode Line Breaking Algorithm.
+ * If the track language is set, some additional language-specific tweaks
+ * may be applied. Setting this enables more breaking opportunities
+ * compared to classic ASS. However, it is still possible for long words
+ * without breaking opportunities to cause overfull lines.
+ * This is incompatible with VSFilter and disabled by default.
+ *
+ * This feature may be unavailable at runtime if
+ * libass was compiled without libunibreak support.
+ */
+ ASS_FEATURE_WRAP_UNICODE,
+
// New enum values can be added here in new ABI-compatible library releases.
} ASS_Feature;