summaryrefslogtreecommitdiff
path: root/libavfilter/vf_drawtext.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2011-09-18 02:51:17 +0200
committerStefano Sabatini <stefasab@gmail.com>2011-09-24 12:36:39 +0200
commit163854bca0e0c1b43831de7463ffa3ff9e6595ca (patch)
tree5790d085eb5b212c998f70d0031c5f768080839a /libavfilter/vf_drawtext.c
parentd7d587db626863866b71e04134c3ed82db480817 (diff)
vf_drawtext: drop text wrapping feature
Or in other word, do not go to the next line when the text cannot be rendered within the frame. The rationale is that wrapping is hard to manage, as it depends on the position of the text, thus making hard/impossible to compute the size occupied by the rendered text, and makes the filter behavior unpredictible with moving text (implemented in a pending patch). Also the current wrapping code is very limited (for example it splits words in the middle), and correctly handling wrapping requires much more complexity (alignment, gravity, word parsing etc.), while drawtext is meant to be only a thin wrapper around libfreetype, so such advanced features don't belong here.
Diffstat (limited to 'libavfilter/vf_drawtext.c')
-rw-r--r--libavfilter/vf_drawtext.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 4a6693e22f..54119a0a5b 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -654,12 +654,6 @@ static int draw_text(AVFilterContext *ctx, AVFilterBufferRef *picref,
x += delta.x >> 6;
}
- if (x + glyph->bbox.xMax >= width) {
- str_w = FFMAX(str_w, x - dtext->x);
- y += text_height;
- x = dtext->x;
- }
-
/* save position */
dtext->positions[i].x = x + glyph->bitmap_left;
dtext->positions[i].y = y - glyph->bitmap_top + y_max;