On Tue, Nov 29, 2016 at 09:31:08AM -0900, l...@lrcd.com wrote: > On Mon, Nov 28, 2016, at 07:29 AM, Andrey Utkin wrote: > > Dimensions of canvas drawtext produces vary depending on symbols in > > text, so add example for printing multiple texts aligned horizontally. > > I don't really understand the use case. Can you explain?
The point is that with more naive approach to printing parts of text, using just same vertical offset (code given below), it will look fine in some cases (e.g. all capital letters), but case of printing part with capital letter(s) and part without capitals, the parts won't be aligned. With the following script, you'll see the dot floating at the top of "A" letter: #!/bin/sh FONTFILE=font.ttf FONTSIZE=32 Y=10 # vertical offset of texts X1=10 # horizontal offset of first text X2=30 # horizontal offset of second text TEXT1="A" TEXT2="." ffplay -f lavfi -i "color=color=white, drawtext=fontfile=$FONTFILE:text=$TEXT1:fontsize=$FONTSIZE:x=$X1:y=$Y, drawtext=fontfile=$FONTFILE:text=$TEXT2:fontsize=$FONTSIZE:x=$X2:y=$Y" _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel