Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pjforde1978
Visitor

Global font setting

Is there a mechanism that allows a developer to set a font that can be used across all font-capable nodes in your application? I just realized that even roAppManager doesn't appear to have font attributes.

If application-level font-setting is not possible, is there a way to define a named font in your XML and then reference it from your labels etc?

I am aware that you can pass a <Font> node to a label or programmatically assign the font in code on a per-item basis. It just seems bizarre that you have to do it for every node, manually.
1 REPLY 1
amakely
Newbie

Re: Global font setting

Is there a standard answer for this? 

I ended up making a custom component that extends Label, and sets the default font family, weight and size, and allows you to change weight and size with component parameters.  Then I just use my custom label everywhere, and I get my font without all of the <Font> nodes everywhere.  

If there is a simpler, more global way to do this, I'd love to know.

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.