Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
imamonkey
Reel Rookie

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
Reel Rookie

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
3 REPLIES 3
sjb64
Roku Guru

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
Reel Rookie

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
DP_Tech
Binge Watcher

Re: Changing font of a Label in XML markdown

Jump to solution

We can confirm this.  Here is a link to a github issue that provides some more info regarding this.

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.