View Full Version : Any way to wrap text?
photoguy123
11th February 2007, 03:32
Is there any to add text to a video and have it autowrap to a given area?
This is pretty simple in a desktop app, but I can't seem to find it in SubTitle, SubTitleEx, or in searches I've done.
Thanks for any ideas...
pg
IanB
11th February 2007, 10:11
Sorry no autowrap.
From 2.5.7 SubTitle(..., lsp=0) will enable the manual multiline facility, i.e. by defining the lsp parameter. To cause text to wrap include "\n" in your text where you want a line break. lsp values other than 0 increase (+) or decrease (-) the line spacing in approx 12% (font dependant) of line height units.
photoguy123
11th February 2007, 20:46
Sorry no autowrap.
From 2.5.7 SubTitle(..., lsp=0) will enable the manual multiline facility, i.e. by defining the lsp parameter. To cause text to wrap include "\n" in your text where you want a line break. lsp values other than 0 increase (+) or decrease (-) the line spacing in approx 12% (font dependant) of line height units.
That's unfortunate, but thanks your reply Ian.
I have found the simplest way to to create tiny title utility that saves out the frame as desired, then it can be manipulated in avisynth in anyway you like.
It's a bit of a hassle to have to run a separate app, but GDI+ text support is actually pretty powerful and with just a few lines of code does many more tricks.
Regards,
PG
foxyshadis
12th February 2007, 01:20
Sorry no autowrap.
From 2.5.7 SubTitle(..., lsp=0) will enable the manual multiline facility, i.e. by defining the lsp parameter. To cause text to wrap include "\n" in your text where you want a line break. lsp values other than 0 increase (+) or decrease (-) the line spacing in approx 12% (font dependant) of line height units.
Oh, so that's what does it. Here I thought I was just mistaken about thinking it had been included in the avisynth core.
IanB
13th February 2007, 00:46
@foxyshadis, I really do try to not change the expected behaviour of Avisynth across versions. Generally to get access to a new feature you will have to explicitly script for it. Old scripts should continue to function as expected. :D
Dreamject
16th May 2019, 13:23
I searched for it but did not find, now you can use avs+ http://avisynth.nl/index.php/Internal_functions#LeftStr
to divide in 2 string string you need to use LeftStr, RightStr and StrLen(string)/2 or limit one part to some number
Str="AyeZabivЪуъСъука"
Length=StrLen(Str)
MaxStrWidth=Ceil(float(Length)/2)
wtf1=LeftStr(Str,MaxStrWidth)
wtf2=RightStr(Str,Length-MaxStrWidth)
then subtitle wtf1 and wtf2
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.