font="pkg:/fonts/font:Muli-ExtraLight.ttf"
[b]font[/b] = [i]CreateObject[/i]("roSGNode", "Font")
font.uri = "pkg:/fonts/font:Muli-ExtraLight.ttf"
font = CreateObject("roSGNode", "Font")
font.uri = "pkg:/images/optima.otf"
font.size = 42
font.color="0xFFFFFFFF"
<Label
id="Title"
translation="[60, 135]"
color="0xf5f5f5"
font="font:Muli-ExtraLight">
<Font role="font"uri = "pkg:/fonts/Muli-ExtraLight.ttf" size="24"/>
</Label>
"lisakb140" wrote:
However, I didn't put that font in my brs file, and it still works. If that's so, then what is the point of putting it in the brs file? Is that necessary??
label = CreateObject("roSGNode", "Label")
font = CreateObject("roSGNode", "Font")
font.uri = "pkg:/fonts/yourFont.ttf"
font.size = 20
label.font = font
It gives me error on role?
cvc-complex-type.3.2.2: Attribute 'role' is not allowed to appear in element 'Font'.