Forum Discussion

WSJTim's avatar
WSJTim
Binge Watcher
3 years ago

Label with custom font disappears with certain sizes

I have a Label with a custom font. For example:

<Label id="label"
color="0xffffff7f"
width="685">
<Font role="font" uri="pkg:/fonts/font.otf" size="22"/>
</Label>

At certain times I'll notice that the label has mysteriously disappeared. If I increase the font size by 1 or decrease it by 1, it'll show up again. But back to the original size, it disappears. I haven't been able to discern what I'm doing (if anything) that makes it disappear which, obviously, makes me nervous that it'll happen in prod.

Has anyone seen this situation?

1 Reply

  • Our team has been struggling with this for a bit, we had no problem with changing sizes on custom fonts before but we finally figured out why.

    Turns out we'd forgotten to put the font file extension (.tff) as the end of the path. Not sure why Roku is able to initially load custom fonts without it but when you change sizes you will need to have it or you get the disappearing issue.

    Hope this helps someone!