… well, ordinarily i’d expect you should be able to assign to the font attribute a roFont, which is what you get from getDefaultFont(). But seems the RSG Maker - “bless the Maker and His water!” - thinks different.
Hm. The “Currently only font files included in the application can be specified.” comment for the URI attribute is not encouraging. The choices the Maker giveth (“font:SmallestSystemFont”, SmallestBoldSystemFont, …, LargeBoldSystemFont) don’t satisfy you?
You can change the font size of any of the system fonts to any value you want, and the system fonts provide bold equivalents for each of the non-bolded fonts; however, I don’t see any way to create an italic font from a system font.
“EnTerr” wrote:
(“font:SmallestSystemFont”, SmallestBoldSystemFont, …, LargeBoldSystemFont) don’t satisfy you?
no, because I need italic (although it is not a nice way for formatting on a TV I admit)
“belltown” wrote:
You can change the font size of any of the system fonts to any value you want,
How do I do that in SceneGraph for a Label Node?
I can set the Size of a Font Node, but afaik I cannot create a Font Node with a system font?
“belltown” wrote:
You can change the font size of any of the system fonts to any value you want,
How do I do that in SceneGraph for a Label Node?
I can set the Size of a Font Node, but afaik I cannot create a Font Node with a system font?
Set the size property of the label’s font property, e.g. in your component’s init() function:
“EnTerr” wrote:
Any chance it can be done via karnapidasana?
i.e. does “font:” qualify as URI protocol?
I just tried it and it didn’t work. It does say in the docs under uri: Specifies a TrueType or OpenType font file. Currently only font files included in the application can be specified.
“EnTerr” wrote:
it was a “Hail Mary pass”.
ostensibly, “font:LargeBoldSystemFont” could be a file specifier.
Let’s hope that’s why they used the word ‘Currently’ in the docs.
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!
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