Roku Developer Program

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

LabelList custom fonts

I'm using a font node for a LabelList. I noticed that the font switches back to the default font for whichever item is focused. 
<LabelList id="list" itemSize="[860, 90]"
size="44" />

Is there a way to fix this?
0 Kudos
3 Replies
Level 8

Re: LabelList custom fonts ... ist+Markup has an example of programatically applying a focusedFont value to the LabelList that should give you the result you are looking for (very bottom of page).
Tyler Smith
0 Kudos
Level 7

Re: LabelList custom fonts

You can also do something like:

  font = CreateObject("roSGNode", "Font")
  font.uri = "pkg:/fonts/font.ttf"
  font.size = 30
  m.list ="list") 
  m.list.font = font
  m.list.focusedFont = font
  m.list.focusedFont.size = font.size+5
0 Kudos
Level 9

Re: LabelList custom fonts

You Should add one more font tag for focused font, under of LabelList.
Try it:-
<LabelList id="list" itemSize="[860, 90]" vertFocusAnimationStyle="floatingFocus">
 <font role="font" uri="pkg:/fonts/DINOT-Medium.otf" size="44" />
 <Font role="focusedFont" uri="pkg:/fonts/DINOT-Medium.otf" size="44" />
0 Kudos