Roku Developer Program

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

Changing font of a Label in XML markdown

Jump to solution

Hi, I've been trying to change the font on the Roku sample channel Label.zip for about two days with no success.

<component name="labelScene" extends="Scene">
    <children>
        <Label
        width = "1280"
        height = "720"
        horizAlign="center"
        vertAlign="center"
        text="ABCD">
        <Font role="font" uri="pkg:/arial.ttf"  size = "42" />
        </Label>
    </children>
</component>

 

Without the Font part, it displays ABCD in the center of the screen as expected but when I try to change the font to anything else, no text is displayed on the screen. I'm aware there are ways to change the font in .brs files but I would like to achieve this using markdown. Any help would be appreciated and thanks!

 

EDIT : Added a zip file of the project https://file.io/7UVcoKyV0eKD

0 Kudos
1 Solution

Accepted Solutions
imamonkey
Level 8

Re: Changing font of a Label in XML markdown

Jump to solution

Hm it seems like it could've been a problem with the debug function in vs code. When I actually install the zip file, it works!

View solution in original post

0 Kudos
2 REPLIES 2
sjb64
Level 10

Re: Changing font of a Label in XML markdown

Jump to solution

Shouldn't it be  

  <Font role="font" uri="pkg:/fonts/arial.ttf" size = "42" />

 ?

0 Kudos
imamonkey
Level 8

Re: Changing font of a Label in XML markdown

Jump to solution

Hm it seems like it could've been a problem with the debug function in vs code. When I actually install the zip file, it works!

0 Kudos