I have a Roku XD/S.
I'm trying to use external font(s) for my application.
From what i've read, it seems that it should work, but I don't see the resulting font on display - just using the system font.
Do I have the BrightScript syntax wrong ? Or should it even work ?
Here's the code snippet:
reg = CreateObject("roFontRegistry")
reg.Register("pkg:/fonts/ROCKB.TTF")
reg.Register("pkg:/fonts/tahoma.ttf")
reg.Register("pkg:/fonts/tahomabd.ttf")
rockwellFont = reg.Get("Rockwell", 30, true, false)
tahomaFont = reg.Get("Tahoma", 30, false, false)
tahomaBold = reg.Get("Tahoma", 20, true, false)
fonts = reg.GetFamilies()
print "the fonts are " fonts ---this is actually showing that i'm using the Rockwell/Tahoma font family.
m.ItemSKU = {
Text: "",
TextAttrs: {
Font: tahomaBold,
Color: "#FFFF00 ",
VAlign: "Middle",
HAlign: "Center"
},
TargetRect: {
x: m.ItemSKUBackground.TargetRect.x,
y: m.ItemSKUBackground.TargetRect.y + 5
w: m.ItemSKUBackground.TargetRect.w,
h: m.ItemSKUBackground.TargetRect.h - 5
}
}
Thanks in advance for any suggestions.....
Scott