Hi,

I posted this question in the Custom Clock thread of Squeezebox Touch,
but maybe this is the better place to ask:

erland wrote: 
> I haven't seen any automatic support for doing line breaks, but it would
> definitely be possible to implement.
> 
> The question is just how the line breaking should work:
> - Line breaking between words is going to waste unnecessary space if
> there is a log word on the right side which doesn't fit on the upper
> row.
> - Line breaking in middle of word is going to look and work bad because
> your brain isn't going to recognize the word which is split upon two
> lines.
> 
> Actually, there might already be line break support when I think about
> it because it's implemented for the rsstext item type in Custom Clock, I
> think that should work for all *text items, for example a "tracktext"
> item where you have set the "text" attribute to "TITLE". To make it
> work, the "scrolling" attribute needs to be set to false and the
> "linelength" attribute needs to have a value (number of pixel width of
> each line). Unfortunately, the "linelength" attribute currently doesn't
> exist in "tracktext" in the Custom Clock Helper configuration page, but
> it is supported in the applet.
> 
> The easiest way to solve it, is probably just to add "lineheight" and
> "linelength" attributes to the Custom Clock Helper plugin.
> 
> That way, you can configure a "tracktext" item as:
> - text: TITLE
> - fontsize: 60
> - lineheight:80
> - linelength: 400
> - scrolling: false
> - posx: 10
> - posy: 10
> 
> This should give you a multi line title with 80 pixels between the
> lines, a 60 pixel font and a line break after 400 pixels. You will have
> to experiment with the exact values, these are just examples.
> 
> I've attached a patch which I think should add the necessary lineheight
> and linelength attributes to Custom Clock Helper if you like to try it.
> 
> If you try the attached patch and it's usable, let me know and I'll
> include it in next Custom Clock Helper release.
> 
> If you don't like to patch Custom Clock Helper, you can also modify the
> settings page on the Touch for Custom Clock clock using vi or similar
> tool. /etc/squeezeplay/userpath/settings/CustomClock.lua
> I think you need to reboot the Touch for the changes to take effect in
> this case.
> 
> If you want to patch the standard SqueezePlay Now Playing screen to do
> line breaks, you will find the Custom Clock line breaking logic in the
> _wordwrap function in CustomClockApplet.lua.


Hello,

sorry to bring up this really old thread - I have searched through a lot
of posts and could not find anything else.

I am trying to build a custom clock as "Now Playing" screensaver. I
would like to have the title broken into three lines. And it does not
work as described above. I can only see the first line, if I turn the
"animate" attribute on, I see the rest of an underlying second line, but
I don't succeed in putting lines beneath each other.

So far, I am using this item definition:


Code:
--------------------
    
{"itemtype":"tracktext","line2fontsize":"","align":"left","fontsize":"22","fontfile":"","width":"320","visibilitygroup":"","order":"","visibilitytime":"","posy":"107","linelength":"320","line1fontsize":"","line1height":"40","line2height":"40","line3height":"40","posx":"5","lineheight":"40","visibilityorder":"","fonturl":"","text":"TITLE","margin":"20","color":"lightgray","line3fontsize":"","scrolling":"false","animate":"false"},
--------------------


Is there anybody who has done something like that?

Examples would be highly appreciated! Thanks a lot.


------------------------------------------------------------------------
schup011's Profile: http://forums.slimdevices.com/member.php?userid=66557
View this thread: http://forums.slimdevices.com/showthread.php?t=68269

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to