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'.
you wouldnt believe that using the font file in the images instead of the fonts directory would be the solution for me, isnt the folder of fonts being included to the bundle ? where is that even defined ?
@random_user, you can put the font file anywhere you want - you just have to use the proper path in your code/XML. It sounds like however you're creating your zip file it isn't pulling in the fonts directory.