diff options
author | Grigori Goronzy <greg@blackbox> | 2012-10-01 17:05:18 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2012-10-01 17:05:18 +0200 |
commit | 9dbd12d8826f4b44248e3823a094ab7ad371d0a7 (patch) | |
tree | bc8597c963cc732518f6cf27b29601c0b546400d /libass | |
parent | a80c45c2e006dc297170d388ba8a3f5346bd4ab2 (diff) | |
download | libass-9dbd12d8826f4b44248e3823a094ab7ad371d0a7.tar.bz2 libass-9dbd12d8826f4b44248e3823a094ab7ad371d0a7.tar.xz |
shaper: allow font encoding -1 for neutral base direction
Diffstat (limited to 'libass')
-rw-r--r-- | libass/ass_shaper.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libass/ass_shaper.c b/libass/ass_shaper.c index b666ffb..89ea97a 100644 --- a/libass/ass_shaper.c +++ b/libass/ass_shaper.c @@ -714,15 +714,18 @@ FriBidiStrIndex *ass_shaper_reorder(ASS_Shaper *shaper, TextInfo *text_info) } /** - * \brief Resolve a Windows font encoding number to a suitable + * \brief Resolve a Windows font charset number to a suitable * base direction. 177 and 178 are Hebrew and Arabic respectively, and * they map to RTL. Everything else maps to LTR for compatibility - * reasons. + * reasons. The special value -1, which is not a legal Windows font charset + * number, can be used for autodetection. * \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; |