diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2020-10-26 00:50:23 +0200 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2022-02-14 20:43:08 +0200 |
commit | c629be7d70548aea282ea4890c51094055ec66e2 (patch) | |
tree | 241292c76a288d30ffc8a4f36a9265c926affa6d /libass/ass.c | |
parent | c4e2aadc88db638eed6090fa81a690235a11d3bd (diff) | |
download | libass-c629be7d70548aea282ea4890c51094055ec66e2.tar.bz2 libass-c629be7d70548aea282ea4890c51094055ec66e2.tar.xz |
Run bidi on each glyph run in isolation by default, like VSFilter
Fixes https://code.google.com/archive/p/libass/issues/111.
Fixes https://github.com/libass/libass/issues/226 if it was not fixed
by commit c93cb3dbfb7357179379ffd19ff973cf062e2129 already.
The old ("sane") behavior of running bidi on each event as a whole*
can be restored by setting the new ASS_FEATURE_WHOLE_TEXT_LAYOUT.
Additionally, in a nod to ASS files and on-the-fly format converters
that use libass's nonstandard Encoding -1 for bidi base direction
autodetection, make Encoding -1 force WHOLE_TEXT_LAYOUT processing
for individual events even when the ASS_Feature is disabled.
* Note: we treat explicit line breaks \N as paragraph separators,
and effectively bidi is run on each "paragraph" separately.
This is standard bidi behavior. Of particular relevance
to libass, this is exactly what WebVTT mandates.
Diffstat (limited to 'libass/ass.c')
-rw-r--r-- | libass/ass.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libass/ass.c b/libass/ass.c index 79a3532..ba60eda 100644 --- a/libass/ass.c +++ b/libass/ass.c @@ -1543,6 +1543,7 @@ int ass_track_set_feature(ASS_Track *track, ASS_Feature feature, int enable) #ifdef USE_FRIBIDI_EX_API FEATURE_MASK(ASS_FEATURE_BIDI_BRACKETS) | #endif + FEATURE_MASK(ASS_FEATURE_WHOLE_TEXT_LAYOUT) | 0; uint32_t requested = 0; |