Add this option to force the box width equl text width:
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 0b94725..5b16cfa 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -164,6 +164,7 @@ typedef struct DrawTextContext {
int use_kerning;
I found that the box_length is shorter than the text_length, and there is no
option to adapt(Equal).
So I suggest ffmpeg.org can add a opption(like boxw_equal_textw) to adapt it !
the old source:
box_w = FFMIN(width - 1 , max_text_line_w);
box_h = FFMIN(height - 1, y + s->max_glyph_h)