diff mbox

[FFmpeg-devel,v2] doc/filters: drawtext: add example of printing texts on same baseline

Message ID 20161214143747.8406-1-andrey.utkin@pb.com
State Accepted
Headers show

Commit Message

Andrey Utkin Dec. 14, 2016, 2:37 p.m. UTC
Height of canvas produced by drawtext varies depending on symbols in
text, so add example for printing separate texts aligned horizontally.

Wording suggested by Lou Logan <lou@lrcd.com>

Signed-off-by: Andrey Utkin <andrey.utkin@pb.com>
Changes in v2:
 * Taken the wording of example and description Lou proposed
 * Added mention of @var{max_glyph_a} to "Note that..." phrase
   (is the markup used for this correct?)
 * Slightly edited commit message for clarity of meaning
   (dimensions vary -> height varies)

 doc/filters.texi | 8 ++++++++
 1 file changed, 8 insertions(+)



Lou Logan Dec. 14, 2016, 6:48 p.m. UTC | #1
On Wed, 14 Dec 2016 14:37:47 +0000, Andrey Utkin wrote:

>  * Added mention of @var{max_glyph_a} to "Note that..." phrase
>    (is the markup used for this correct?)

It's basically author's preference since the usage in the docs is
mixed and inconsistent, and we don't have any specific guidelines or
rules regarding usage of Texinfo "commands". However, this list may be


What mostly matters is that commands, options, values, etc are
presented in a way that differentiates them from descriptive text, and
that usage is consistent. So for consistency I changed it to @option,
and it seems more like an option to me than a "metasyntactic variable".

(If someone wants to volunteer to clean up the Texinfo commands in the
docs that would certainly be welcome, but I think it would be a boring
and tedious task.)

>  doc/filters.texi | 8 ++++++++
>  1 file changed, 8 insertions(+)

Applied. Thanks.
diff mbox


diff --git a/doc/filters.texi b/doc/filters.texi
index 3ae3c46d26..97ff517054 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -7135,6 +7135,14 @@  FOD=5 # fade out duration
 ffplay -f lavfi "color,drawtext=text=TEST:fontsize=50:fontfile=FreeSerif.ttf:fontcolor_expr=ff0000%@{eif\\\\: clip(255*(1*between(t\\, $DS + $FID\\, $DE - $FOD) + ((t - $DS)/$FID)*between(t\\, $DS\\, $DS + $FID) + (-(t - $DE)/$FOD)*between(t\\, $DE - $FOD\\, $DE) )\\, 0\\, 255) \\\\: x\\\\: 2 @}"
 @end example

+Horizontally align multiple separate texts. Note that @var{max_glyph_a} and the
+@option{fontsize} value are included in the @option{y} offset.
+@end example
 @end itemize

 For more information about libfreetype, check: