Developers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sharkieSBS
Newbie

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
Tags (1)
0 Kudos
Community is Being Upgraded!

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!