Just discovered this thread and the renewed component (thank you!).
Wanted to give a shoutout to @fabiospark for the post @
https://hydrogenaud.io/index.php/topic,43044.msg914190.html#msg914190
I'm not sure I could have figured out the syntax for the word wrap function. Thanks for sharing your code!
The component is a godsend, esp. the ability to have multiple lines and comments.
Here's my implementation of word wrap for displaying the Comment tag. While most of my files won't need word wrap, I'm pretty sure there are some that will benefit.
//start Artist, Album w/Year
$rgb(255,223,2,0,0,0)
[%artist%
$rgb(37,209,25,0,0,0) : ]
$rgb(255,223,2,0,0,0)$if(%title%,['('%date%')' %album%]
//end Artist, Album w/Year
$crlf()
//start Title
$rgb(37,209,25,0,0,0)
%title%,%_filename%)[ '['%_time_elapsed%']']$if(%_ispaused%,' [paused]')
//end Title
$crlf()
//start Comment tag
$rgb(255,223,2,0,0,0)
//If Comment tag length is greater than 85 than start to cut it in two lines
//otherwise show it on a single line
$ifgreater($len(%comment%),85,
//First line of Comment tag, truncated at the last space before the 85th character
$puts(tae,$strrchr($substr(%comment%,1,85), ))
$substr(%comment%,1,$get(tae))
$crlf()
//Second line of Comment tag, from the first character after the last of the first line
//to the last space inside the next 85 chars or to the end of Comment tag if shorter.
$puts(tbs,$add($get(tae),1))
$ifgreater($sub($len(%comment%),$get(tae)),85,
$puts(tbe,$add($get(tbs),$strrchr($substr(%comment%,$get(tbs),$add($get(tbs),85)), )))
$rgb(255,223,2,0,0,0)$substr(%comment%,$get(tbs),$get(tbe))
,$rgb(255,223,2,0,0,0)$substr(%comment%,$get(tbs),$add($get(tbs),85)))
,%comment%)
//end Comment tag
Here are a couple screenshots. I'm often running fb2k on a dedicated PC connected to via VNC, which is in the background while surfing or watching TV. It's handy to have the OSD persist in those situations; easy enough to switch to a timed setting otherwise.
https://ibb.co/wYHsp4y
https://ibb.co/1T8GCVt
.