summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libass/ass_render.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 6e9aef2..e2d0ef5 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -2131,12 +2131,14 @@ static void apply_baseline_shear(ASS_Renderer *render_priv)
TextInfo *text_info = &render_priv->text_info;
FriBidiStrIndex *cmap = ass_shaper_get_reorder_map(render_priv->shaper);
int32_t shear = 0;
- double last_fay = 0;
+ bool whole_text_layout =
+ render_priv->track->parser_priv->feature_flags &
+ FEATURE_MASK(ASS_FEATURE_WHOLE_TEXT_LAYOUT);
for (int i = 0; i < text_info->length; i++) {
GlyphInfo *info = text_info->glyphs + cmap[i];
- if (text_info->glyphs[i].linebreak || last_fay != info->fay)
+ if (text_info->glyphs[i].linebreak ||
+ (!whole_text_layout && text_info->glyphs[i].starts_new_run))
shear = 0;
- last_fay = info->fay;
if (!info->scale_x || !info->scale_y)
info->skip = true;
if (info->skip)