Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
johnmarsden
Visitor

Accessing characters in Latin Extended Additional? They're boxes right now.

How do you get Latin Extended Additional characters to show up? Even with the system font, they're just showing boxes. For example: "Ḁ ḁ Ḉ Ḍ ḓ ḗ Ḡ Ḳ" 

While all those characters work on the web with fonts like Helvetica, Arial, Gotham, etc... they do not work in Roku firmware 8.0. Is there anything I can do about this?


https://en.wikipedia.org/wiki/Latin_Extended_Additional
0 Kudos
5 REPLIES 5
marcelo_cabral
Roku Guru

Re: Accessing characters in Latin Extended Additional? They're boxes right now.

Use custom fonts, that can map the characters properly. I used fonts to show Trello icons for example on my "Rokanban for Trello" channel
0 Kudos
johnmarsden
Visitor

Re: Accessing characters in Latin Extended Additional? They're boxes right now.

How do you "map the characters properly"? 

If I'm using Helvetica which is capable of displaying them: Ḁ ḁ Ḉ Ḍ ḓ ḗ Ḡ Ḳ   Then shouldn't that work? I've tested that it works in browsers and stuff with various fonts, but using those same fonts won't show the characters Roku.

I remember back in the Adobe Flash days you could select which glyph sets you wanted to import; but I don't think there's a thing like that for Roku.
0 Kudos
johnmarsden
Visitor

Re: Accessing characters in Latin Extended Additional? They're boxes right now.

Bump.
0 Kudos
marcelo_cabral
Roku Guru

Re: Accessing characters in Latin Extended Additional? They're boxes right now.

Ok, let me explain what I did with the Trello font.

As I wanted specific characters defined on the font, I created an object so I could easily access each icon. With regular Unicode (UTF-8) you should not need this approach, but in my case these characters are mapped inside the font, these are not regular Unicode characters.

myIcons = { icons: {
    activity: Chr(&hE900), 
    archive: Chr(&hE905),
             attachments: Chr(&hE906), 
             card: Chr(&hE90F), 
             check: Chr(&hE910),
             checklist: Chr(&hE911), 
             comments: Chr(&hE916),
             description: Chr(&hE917),
             due: Chr(&hE914), 
             edit: Chr(&hE91D),
             label: Chr(&hE930),
             logo: Chr(&hE908), 
             member: Chr(&hE934),
             private: Chr(&hE943),
             public: Chr(&hE944),
             team: Chr(&hE93D)}}


In a Scene Graph XML I defined my custom font this way:
       <Label id="comment" color="#4D4D4D" width="830" wrap="true" lineSpacing="1" maxLines="3" translation="[60,30]">
           <Font role="font" uri="pkg:/fonts/facit-trellicons.ttf" size="28"/>
       </Label>


And finally in my code I just assigned the text this way:
m.comment.text = myIcons.comments + " Comments"


In your case, you can just copy and paste the text in your code. Just make sure the source text file is encoded properly in UTF-8
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: Accessing characters in Latin Extended Additional? They're boxes right now.

"johnmarsden" wrote:
How do you "map the characters properly"? 

If I'm using Helvetica which is capable of displaying them: Ḁ ḁ Ḉ Ḍ ḓ ḗ Ḡ Ḳ   Then shouldn't that work? I've tested that it works in browsers and stuff with various fonts, but using those same fonts won't show the characters Roku.


You shouldn't have to do anything other than using a font that includes those characters in its repertoire.

Where did you get your Helvetica font file? Have you verified that the .ttf / .otf has glyphs defined at those Unicode code points, and that the string/text you are trying to display has the corresponding Unicode character values?

I did a quick test with some of those characters and they displayed as expected using a Google Noto font.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.