diff options
Diffstat (limited to 'libass/ass_render.c')
-rw-r--r-- | libass/ass_render.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index 58d1a157..5f03ab5b 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -735,13 +735,10 @@ static void compute_string_bbox(TextInfo *text, DBBox *bbox) for (i = 0; i < text->length; ++i) { GlyphInfo *info = text->glyphs + i; if (info->skip) continue; - while (info) { - double s = d6_to_double(info->pos.x); - double e = s + d6_to_double(info->advance.x); - bbox->xMin = FFMIN(bbox->xMin, s); - bbox->xMax = FFMAX(bbox->xMax, e); - info = info->next; - } + double s = d6_to_double(info->pos.x); + double e = s + d6_to_double(info->cluster_advance.x); + bbox->xMin = FFMIN(bbox->xMin, s); + bbox->xMax = FFMAX(bbox->xMax, e); } } else bbox->xMin = bbox->xMax = bbox->yMin = bbox->yMax = 0.; |