font_registry = CreateObject("roFontRegistry")
font = font_registry.GetDefaultFont()
fontRegistry = CreateObject("roFontRegistry")
townFont = fontRegistry.GetDefaultFont()
townFont.size = 80
lineHeight = townFont.GetOneLineHeight()
///
Current Function:
005: sub InitWidget()
006: font_registry = CreateObject("roFontRegistry")
007:* font = font_registry.GetDefaultFont()
008: fontRegistry = CreateObject("roFontRegistry")
009: townFont = fontRegistry.GetDefaultFont()
010: townFont.size = 80
011: _lineHeight = townFont.GetOneLineHeight()
'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in pkg:/components/widgets/LocationWidget.brs(7)
007: font = font_registry.GetDefaultFont()
"OG_OTT" wrote:
Does `roFontRegistry` work with RSG? Do I have a typo or is there a better way than below?
sub init()
InitWidget()
end sub
sub InitWidget()
townLabel = m.top.findNode("TownName")
townLabel.font.size = 80
townLabelRect = townLabel.BoundingRect()
stateLabel = m.top.findNode("StateName")
stateLabel.font.size = 40
stateLabel.translation = [0, townLabelRect.height+5]
end sub
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!