Littlelies
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016
02:48 AM
Custom font for Rowlist label ?
Hi, I would like to change the font for a rowlist label (to display Arabic chars).
I tried using rowLabelFont, but didn't manage to make it work.
How can I achieve that?
I tried using rowLabelFont, but didn't manage to make it work.
How can I achieve that?
9 REPLIES 9
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016
08:15 AM
Re: Custom font for Rowlist label ?


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016
09:22 AM
Re: Custom font for Rowlist label ?
"EnTerr" wrote:
Ha - WTH is type "font", i wonder?!
Possibly https://sdkdocs.roku.com/display/sdkdoc/Font will help.
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016
09:27 AM
Re: Custom font for Rowlist label ?
"RokuKC" wrote:"EnTerr" wrote:
Ha - WTH is type "font", i wonder?!
Possibly https://sdkdocs.roku.com/display/sdkdoc/Font will help.
I am afraid not - can you elaborate how does one assign an XML element (which "Font" is) to an XML attribute (which "rowLabelFont" is)?
As a reminder, XML attributes cannot be structured. And to re-iterate, RSG attribute types do not list a "font" data type - so if not from XML, i have no clue how to do that from B/S...


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016
10:34 AM
Re: Custom font for Rowlist label ?
"EnTerr" wrote:
I am afraid not - can you elaborate how does one assign an XML element (which "Font" is) to an XML attribute (which "rowLabelFont" is)?
Your leopard-tracking skills are getting rusty. :roll: 😉
Notice the "role" attribute in the Font node, mentioned in https://sdkdocs.roku.com/display/sdkdoc/Font .
See https://sdkdocs.roku.com/display/sdkdoc ... Components and search for "<Font>".
Also https://sdkdocs.roku.com/display/sdkdoc/Typography .
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016
11:09 AM
Re: Custom font for Rowlist label ?
"RokuKC" wrote:
Your leopard-tracking skills are getting rusty. :roll: 😉
"Yeah, a regular Rip van Winkle", apparently.
I can't believe i forgot about the "role" karnapidasana. Tsk-tsk - I am disappointed in you, me! 😉
So to recap, the font can be
- specified as a string to the attribute (for system fonts)
- assigned as roSgNode to the attribute (only in B/S)
- or "the yoga role way" (only in XML)
lisakb140
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2018
10:20 AM
Re: Custom font for Rowlist label ?
I am struggling with this same issue---what did you end up doing to make this work??
ionatan
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2018
07:41 AM
Re: Custom font for Rowlist label ?
Did someone found a solution to use a custom font with rowlist label?
Update: role="rowLabelFont" would do it.
Update: role="rowLabelFont" would do it.
norcaljohnny
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2018
02:53 PM
Re: Custom font for Rowlist label ?
Here are the steps to use a custom font
1. create a folder named "fonts" in the root folder of your app (ie components, images, fonts. out, source)
2. place the font in the newly created "fonts" folder (ie fonts(folder) > yourFontFile.otf(file))
3. create some Brightscript code for a font node and label node. (in this case I am using Apples SanFrancisco font named sf.otf and placed it in my "fonts" folder)
So, now whenever I use the label node the font used for it will be my custom sf.otf font with a font size of 20
1. create a folder named "fonts" in the root folder of your app (ie components, images, fonts. out, source)
2. place the font in the newly created "fonts" folder (ie fonts(folder) > yourFontFile.otf(file))
3. create some Brightscript code for a font node and label node. (in this case I am using Apples SanFrancisco font named sf.otf and placed it in my "fonts" folder)
label = CreateObject("roSGNode", "Label")
font = CreateObject("roSGNode", "Font")
font.uri = "pkg:/fonts/sf.otf"
font.size = 20
label.font = font
So, now whenever I use the label node the font used for it will be my custom sf.otf font with a font size of 20
<label id=title text="Just some title" />
MM_Lasse
Reel Rookie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020
12:52 AM
Re: Custom font for Rowlist label ?
You can declare a Font in a Label like this:
<Label> <Font id="IdYourFont" role="font" uri="pkg:/.../fonts/YourFont.ttf" size="40" /> </Label>
And use it in a RowList like this:
<RowList [...] rowLabelFont="dictionary:IdYourFont" />