Forum Discussion

imamonkey's avatar
imamonkey
Reel Rookie
3 years ago
Solved

Changing font of a Label in XML markdown

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

  • 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!

3 Replies

  • Shouldn't it be  

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

     ?

  • 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!

    • DP_Tech's avatar
      DP_Tech
      Binge Watcher

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