Hi,
Quick question for plugin developers [plus Dean]
Does anyone use $client->param('font', ...) to fix the font for their mode display?
Its not used by the server or any shipped plugins and if I depreciate it (to be replaced by a more flexible which allows fonts to by
the lines function), I can do a bit of extra caching the default fonts during rendering.
Adrian
Results 1 to 10 of 28
-
2005-08-11, 14:21 #1Senior Member
- Join Date
- Apr 2005
- Posts
- 6,980
Graphics - question for plugin developers
-
2005-08-11, 14:33 #2
Graphics - question for plugin developers
Quoting Triode <triode1 (AT) btinternet (DOT) com>:
> Hi,
>
> Quick question for plugin developers [plus Dean]
>
> Does anyone use $client->param('font', ...) to fix the font for their mode
> display?
I don't believe any of mine do, and if I'm wrong, I'm ready to make changes
\
(might want to re-post to Plugins forum just in case not all the plugin authors
are subscribed here)
-k
-
2005-08-11, 14:33 #3
Graphics - question for plugin developers
The only thing that might have used it was the firmware update screen
("Press and hold BRIGHTNESS..."), which was broken the last time I
noticed. (It should default to the small font so that the full text
fits on the screen.)
On Aug 11, 2005, at 2:21 PM, Triode wrote:
> Hi,
>
> Quick question for plugin developers [plus Dean]
>
> Does anyone use $client->param('font', ...) to fix the font for
> their mode display?
>
> Its not used by the server or any shipped plugins and if I
> depreciate it (to be replaced by a more flexible which allows fonts
> to by the lines function), I can do a bit of extra caching the
> default fonts during rendering.
>
> Adrian
>
-
2005-08-11, 14:34 #4
Graphics - question for plugin developers
> Does anyone use $client->param('font', ...) to fix the font for their
> mode display?
Never heard abou it :-)
--
Michael
-----------------------------------------------------------
Help translate SlimServer by using the
StringEditor Plugin (http://www.herger.net/slim/)
-
2005-08-11, 15:09 #5
Graphics - question for plugin developers
Quoting dean blackketter <dean (AT) slimdevices (DOT) com>:
> The only thing that might have used it was the firmware update screen
> ("Press and hold BRIGHTNESS..."), which was broken the last time I
> noticed. (It should default to the small font so that the full text
> fits on the screen.)
d'oh...thought I fixed that(?)
I believe it used $client->textSize() anyway.
-kdf
-
2005-08-11, 15:41 #6Senior Member
- Join Date
- Apr 2005
- Posts
- 6,980
Graphics - question for plugin developers
> d'oh...thought I fixed that(?)
>
> I believe it used $client->textSize() anyway.
>
Yes it uses $client->textSize so won't be impacted by this. What's actually wrong with it btw it does look like it sets the
textSize to 0 before displaying anything. [I've not tried it though]
I suspect it is only people who have looked at the server code in detail who know the 'fonts' param exists ...
-
2005-08-11, 16:03 #7
Graphics - question for plugin developers
Quoting Triode <triode1 (AT) btinternet (DOT) com>:
> > d'oh...thought I fixed that(?)
> >
> > I believe it used $client->textSize() anyway.
> >
>
> Yes it uses $client->textSize so won't be impacted by this. What's actually
> wrong with it btw it does look like it sets the
> textSize to 0 before displaying anything. [I've not tried it though]
>
> I suspect it is only people who have looked at the server code in detail who
> know the 'fonts' param exists ...
heh, from the comments at change 2149 when this was introduced, it looks like it
might have even been my code. I dont even remeber it was there
)
I guess that must have been part of the modified parts to the patch I sent in
there somewhere. Clearly not a critical bit, and I can't see it used in any of
the 40+ plugins I have stored here.
--kdf
-
2005-08-12, 02:46 #8
Graphics - question for plugin developers
Hi all
Fine with me. I thought I might have used it for TinyLittlePacMan but checking the code revealed I didn't.
Felix
-
2005-08-12, 13:30 #9Senior Member
- Join Date
- Apr 2005
- Posts
- 6,980
Graphics - question for plugin developers
OK here's a prototype of what I have been playing with.
The idea is for lines functions to return a hash of components and to allow this to also contain definitions which override the
default fonts on a per component basis rather than just the whole line as in the current server code.
The patch includes a demo using the new alarm bell sign in DataTime - this is displayed all the time as overlay1 with a fixed font
even though the rest of date time changes as you change the font size.
Plugin developers - I'd be interested in feedback on the format of the hash the lines function is returning:
return {
'center1' => Slim::Utils::Misc::longDateF(),
'center2' => Slim::Utils::Misc::timeF(),
'overlay1'=> ($alarmOn ? $client->symbols('bell') : undef),
'fonts' => {
'graphic-280x16' => { 'overlay1' => \ 'small.1' },
'graphic-320x32' => { 'overlay1' => \ 'standard.1' },
'text' => { 'displayoverlays' => 1 },
},
};
The fonts bit means:
for SBG (280x16) use "small.1" as the font for overlay1 [all other fonts are as defaults, you can specify all of them if you
want as extra elements in this hash]
for SB2 (320x32) use "standard.1" as the font for overlay1
for SB1/SLIMP3 (text) - display overlays even in doubled mode
Are the player names ('graphic-280x16' etc) appropriate or should I create some new ones? [these use $client->vdfmodel() for the
graphic player names]
Adrian
-
2005-08-12, 14:17 #10
Graphics - question for plugin developers
I wonder if there's a way we can make it simpler for the caller for
the simple case:
> return {
> 'center1' => Slim::Utils::Misc::longDateF(),
> 'center2' => Slim::Utils::Misc::timeF(),
> 'overlay1'=> ($alarmOn ? $client->symbols('bell') : undef),
> 'fonts' => {
> 'graphic-280x16' => 'small',
> 'graphic-320x32' => 'standard',
> 'text' => 1,
> },
> };
Would this also work?
On Aug 12, 2005, at 1:30 PM, Triode wrote:
> OK here's a prototype of what I have been playing with.
>
> The idea is for lines functions to return a hash of components and
> to allow this to also contain definitions which override the
> default fonts on a per component basis rather than just the whole
> line as in the current server code.
>
> The patch includes a demo using the new alarm bell sign in DataTime
> - this is displayed all the time as overlay1 with a fixed font even
> though the rest of date time changes as you change the font size.
>
> Plugin developers - I'd be interested in feedback on the format of
> the hash the lines function is returning:
>
> return {
> 'center1' => Slim::Utils::Misc::longDateF(),
> 'center2' => Slim::Utils::Misc::timeF(),
> 'overlay1'=> ($alarmOn ? $client->symbols('bell') : undef),
> 'fonts' => {
> 'graphic-280x16' => { 'overlay1' => \ 'small.1' },
> 'graphic-320x32' => { 'overlay1' => \ 'standard.1' },
> 'text' => { 'displayoverlays' => 1 },
> },
> };
>
> The fonts bit means:
> for SBG (280x16) use "small.1" as the font for overlay1 [all
> other fonts are as defaults, you can specify all of them if you
> want as extra elements in this hash]
> for SB2 (320x32) use "standard.1" as the font for overlay1
> for SB1/SLIMP3 (text) - display overlays even in doubled mode
>
> Are the player names ('graphic-280x16' etc) appropriate or should I
> create some new ones? [these use $client->vdfmodel() for the
> graphic player names]
>
> Adrian
>
> <fontlines2.diff>
>

Reply With Quote

