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: 
philotas
Roku Guru

Re: How to modify System Fonts in SceneGraph?

@belltown

thanks for showing me how to set the size for a system Font.
I am a little embarrassed that I did not try that myself... :oops:

this code seemed a little weird, but obvioulsy setting the font of a Label to a string converts it to a Font Node
m.top.font = "font:LargeBoldSystemFont"
m.top.font.size = 20
0 Kudos
EnTerr
Roku Guru

Re: How to modify System Fonts in SceneGraph?

"philotas" wrote:
this code seemed a little weird, but obvioulsy setting the font of a Label to a string converts it to a Font Node
m.top.font = "font:LargeBoldSystemFont"
m.top.font.size = 20


It is weird, isn't it! :idea:
.font property is polymorphic, apparently - takes (and returns) font objects but if assigned string, converts it to a Font on the spot. And hence the next line works ("wait, what? how am i assigning number to a field in a string?!")
0 Kudos
philotas
Roku Guru

Re: How to modify System Fonts in SceneGraph?

Yes it is!
This could be at least documented...
0 Kudos
EnTerr
Roku Guru

Re: How to modify System Fonts in SceneGraph?

"philotas" wrote:
Yes it is!
This could be at least documented...

Documentation is for wimps! Smiley LOL
i suspect the docu-mentalist has jumped Roku ship (either that or RSG drove them past the verge of nervous breakdown?), since have not updated a single page in over 3 months.
Drop a request/note in viewtopic.php?f=34&t=69731, maybe someone will be shoring up
0 Kudos
belltown
Roku Guru

Re: How to modify System Fonts in SceneGraph?

Actually it does state in the documentation that you can set the font's size property, if that's what you were looking for:

In https://sdkdocs.roku.com/display/sdkdoc/Typography:

you can also set sizes explicitly using BrightScript:
m.mylargerlabel.font.size = m.mylargerlabel.font.size+5
https://github.com/belltown/
0 Kudos