tutash
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2017
08:16 AM
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.
Is there a way to fix this?
<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?
3 REPLIES 3
Tyler_Smith
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2017
04:57 PM
Re: LabelList custom fonts
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).
Tyler Smith
wizaro
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2017
04:18 PM
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 = m.top.FindNode("list")
m.list.font = font
m.list.focusedFont = font
m.list.focusedFont.size = font.size+5
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
balbant
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2017
06:37 AM
Re: LabelList custom fonts
You Should add one more font tag for focused font, under of LabelList.
Try it:-
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>