summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_shaper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass_shaper.c b/libass/ass_shaper.c
index 273bfb1..2de12d5 100644
--- a/libass/ass_shaper.c
+++ b/libass/ass_shaper.c
@@ -640,7 +640,7 @@ static void shape_harfbuzz(ASS_Shaper *shaper, GlyphInfo *glyphs, size_t len)
int offset = i;
hb_font_t *font = get_hb_font(shaper, glyphs + offset);
int level = glyphs[offset].shape_run_id;
- int direction = shaper->emblevels[offset] % 2;
+ int direction = FRIBIDI_LEVEL_IS_RTL(shaper->emblevels[offset]);
// advance in text until end of run
while (i < (len - 1) && level == glyphs[i+1].shape_run_id)