Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 3 123 LastLast
Results 1 to 10 of 28
  1. #1
    Senior Member
    Join Date
    Apr 2005
    Posts
    6,980

    Graphics - question for plugin developers

    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


  2. #2
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493

    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

  3. #3
    Gadfly, Former Founder Slim Devices dean's Avatar
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    4,427

    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
    >

  4. #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    18,933

    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/)

  5. #5
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493

    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

  6. #6
    Senior 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 ...


  7. #7
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493

    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

  8. #8
    Slim Devices Developer fcm4711's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    855

    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

  9. #9
    Senior 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


  10. #10
    Gadfly, Former Founder Slim Devices dean's Avatar
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    4,427

    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>
    >

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •