diff options
author | Grigori Goronzy <greg@hein> | 2012-05-19 01:01:30 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@hein> | 2012-05-19 13:11:49 +0200 |
commit | de409235f4a32f6dfa6ab73eeb4bcd8d3b679387 (patch) | |
tree | c3a94717b9bef5bb6a139e28fcb92c4863aced0a /libass/ass_shaper.c | |
parent | f1d3d38dc81cc07b432d93bb2346f3b8c24c920a (diff) | |
download | libass-de409235f4a32f6dfa6ab73eeb4bcd8d3b679387.tar.bz2 libass-de409235f4a32f6dfa6ab73eeb4bcd8d3b679387.tar.xz |
shaper: fix control character filtering
Correct off-by-one error and add 0x200c-0x200f range. This range
is compromised of explicit direction and join marks.
Fixes issue 54
Fixes issue 55
Diffstat (limited to 'libass/ass_shaper.c')
-rw-r--r-- | libass/ass_shaper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libass/ass_shaper.c b/libass/ass_shaper.c index cf563ad..27c1dad 100644 --- a/libass/ass_shaper.c +++ b/libass/ass_shaper.c @@ -640,7 +640,8 @@ void ass_shaper_shape(ASS_Shaper *shaper, TextInfo *text_info) // Skip direction override control characters // NOTE: Behdad said HarfBuzz is supposed to remove these, but this hasn't // been implemented yet - if (glyphs[i].symbol <= 0x202F && glyphs[i].symbol >= 0x202a) { + if ((glyphs[i].symbol <= 0x202e && glyphs[i].symbol >= 0x202a) + || (glyphs[i].symbol <= 0x200f && glyphs[i].symbol >= 0x200c)) { glyphs[i].symbol = 0; glyphs[i].skip++; } |