summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2012-10-01 15:53:32 +0200
committerGrigori Goronzy <greg@blackbox>2012-10-01 16:24:19 +0200
commita80c45c2e006dc297170d388ba8a3f5346bd4ab2 (patch)
tree4ee025ec75048216741c8a81bf866bf99b00bc0d
parent20f83b10241aa9c67c3a7e0c1a7e4d986fe199f1 (diff)
downloadlibass-a80c45c2e006dc297170d388ba8a3f5346bd4ab2.tar.bz2
libass-a80c45c2e006dc297170d388ba8a3f5346bd4ab2.tar.xz
shaper: always use LTR base direction by default
Unfortunately, VSFilter always assumes LTR base direction. All existing Arabic subtitles have been designed with that in mind. This causes various issues, for instance punctuation placed at the wrong side of a line. We have no other choice than to use the same braindead always-LTR assumption (except if overridden by the font encoding property).
-rw-r--r--libass/ass_shaper.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libass/ass_shaper.c b/libass/ass_shaper.c
index 27c1dad..b666ffb 100644
--- a/libass/ass_shaper.c
+++ b/libass/ass_shaper.c
@@ -716,15 +716,13 @@ FriBidiStrIndex *ass_shaper_reorder(ASS_Shaper *shaper, TextInfo *text_info)
/**
* \brief Resolve a Windows font encoding number to a suitable
* base direction. 177 and 178 are Hebrew and Arabic respectively, and
- * they map to RTL. 1 is autodetection and is mapped to just that.
- * Everything else is mapped to LTR.
+ * they map to RTL. Everything else maps to LTR for compatibility
+ * reasons.
* \param enc Windows font encoding
*/
FriBidiParType resolve_base_direction(int enc)
{
switch (enc) {
- case 1:
- return FRIBIDI_PAR_ON;
case 177:
case 178:
return FRIBIDI_PAR_RTL;