Help - Search - Members - Calendar
Full Version: how to handle long title name ?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
adrianmak
i found that for some long title name as show below, the track title name will cover the playback time
IPB Image

I have to adjust/resize the foobar200 windows to allow more spaces.
IPB Image


How you guys handle long title name on your foobar playlist style ?
is it able to justify into two lins automatically for example.
stampgevaar
I use

$iflonger(%album%,40,$cut(%album%,30)...,%album%)

so if my album is longer than 40 letters it gets cut to 30 letters with 3 points behind it. You can also let it scroll but I have no idea how to do that...
FofR
I use $alignabs() to determine the width of a text box, using something along the lines of $eval(%_width%-20) for the width where 20 is the width of the track length. This will automatically crop when it needs to.
Yotsuya
Like FofR, I subtract the width of the right time display column from %_width% and use that to define an $alignabs() textbox.
adrianmak
is that means it is not possible to display title in full but crop it.
FofR
You could have a $ifgreater($calcwidth(text),%_width%,$font(,10,,))
Something along those lines would reduce the font size when necessary.
noorotic
In some cases, such as displaying the full path/filename of a file, I try to do a fair job at making it 'pretty' (this comes from an MS API funciton I believe). What you get is something along the lines of:

G:\music\fla...ub Band\A Day In The Life.flac

Without the ability to loop, it can be tricky, but I've worked out various methods which do a pretty fair job. You need to know that you must set your font information before using $calcwidth(). You have to come up with a way to average the width of the fonts characters, which I haven't been very good at.

Hope that helps...
shakey_snake
this will choose not to display info found in brackets at the end of a title if it's too long to fit:

CODE
$ifgreater($calcwidth(%title%),$sub(%_width%,62),$cut(%title%,$sub($strchr(%title%,'['),2)),%title%)
adrianmak
all of your suggestion is something like check the total title length, if greater than the space avaiable, reformat the title like trim out possible text, use MS like ...\xxxxx

is it possible to seperate into two lines if title length is longer than available space

e.g.
CODE

1. song1                                         3:10
2. song 2                                   4:50
3. song 3 [xxxxxxxxxxxxxxxxxxxxxxx]
4. song4xxxx                                  3:54


will be
CODE

1. song 1                      3:10
2. song 2                      4:50
3. song 3                     3:20
   [xxxxxxxxxxxxxxxxxxxxxxxx]
4. song4xxxx                                  3:54
FofR
If you use alignabs anything that overruns goes onto the next line provided the height is correct.
VeaaC
But that would mean you have to waste space for every song that needs only one line to be displayed
orchid
I'll post in this old thread instead of creating new.
QUOTE(stampgevaar @ Mar 16 2007, 09:23) *

I use

$iflonger(%album%,40,$cut(%album%,30)...,%album%)

so if my album is longer than 40 letters it gets cut to 30 letters with 3 points behind it. You can also let it scroll but I have no idea how to do that...

Is there a way to cut the length so it scales with width? $alignabs() is otherwise fine, but it removes full words instead of single letters. I want to keep the three dots in end as well if possible.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.