Forum Discussion

philotas's avatar
philotas
Roku Guru
9 years ago

How to modify System Fonts in SceneGraph?

Is it possible to make different version of the Build in SceneGraph Fonts, for example making a smaller, bigger or italic version of one font?

In BrightScript i could do something like this to get 10pt italic font, but in SceneGraph?


    reg = CreateObject("roFontRegistry")
    font = reg.GetDefaultFont(10, false, true)

 
I know, that I could create a Font node with my embedded TTF but I am asking for creating versions of the build in fonts.
thanks!

14 Replies

  • "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?!")
  • "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