Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 

scene graph -- specify label font size

Is there a way to set the font size on the label? I don't see an attribute for that. Is it common practice to scale the node instead?

http://sdkdocs.roku.com/display/sdkdoc/Label
0 Kudos
3 Replies
TheEndless
Level 7

Re: scene graph -- specify label font size

Use the Font node.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos

Re: scene graph -- specify label font size

Use the font node instead of the label component? Or do labels support the font node somehow? Will label components never take a font size?
0 Kudos
TheEndless
Level 7

Re: scene graph -- specify label font size

Use the Font node inside the Label component, as shown on the page I linked to. If you add a Font node as a child of the Label node and set its role to "font", the label will use that font. Additionally, once a font is defined in your component, if you give it an ID, you can reference it via the "dictionary:" prefix the same way you specify the default fonts... e.g., use "dictionary:MyFont" instead of "font:MediumBoldSystemFont". Here's a good example of both of these: http://sdkdocs.roku.com/display/sdkdoc/ ... des+in+XML
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos