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]"
vertFocusAnimationStyle="floatingFocus">
 <font 
 role="font" 
 uri="pkg:/fonts/DINOT-Medium.otf" 
 size="44" />
</LabelList>

Is there a way to fix this?

https://sdkdocs.roku.com/display/sdkdoc … 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).

You can also do something like:

font = CreateObject(“roSGNode”, “Font”)
font.uri = “pkg:/fonts/font.ttf”
font.size = 30

m.list = m.top.FindNode(“list”)
m.list.font = font
m.list.focusedFont = font
m.list.focusedFont.size = font.size+5

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" />
</LabelList>