Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
sharkieSBS
Level 7

Unwanted font weight on Button focus

I'm using custom fonts and have worked around the standard issues that presents.

What I'm yet to solve is the way that the platform seems to add font weight to my focused Button text, without exposing font weight as a targetable property.

Here's a section of the Screen, with `SEASON 1` focused:



And here's the code I'm using to set the focused and unfocused Button styles:
...
Sub setup()
 m.seasons.setFocus(true)

  m.font = typography()

...

  m.seasons.translation = "[0, 70]"
  m.seasons.textFont = m.font.button
  m.seasons.textColor =  m.palette.light
  m.seasons.focusedTextFont = m.font.button
  m.seasons.focusedTextColor =  m.palette.primary
  m.seasons.focusBitmapUri = m.graphics.transparent
...

Function typography() as Object
  button = CreateObject("roSGNode", "Font")
  button.uri = m.global.fonts.button.uri
  button.size = m.global.fonts.button.size
...


Anyone encountered a similar issue?
_______________________________________________________________________________
Craig Sharkie
Connected TV Lead, Engineering – EDS & OD
sbs.com.au
0 Kudos