Forum Discussion
6 Replies
- marcelo_cabralRoku GuruUse custom fonts, that can map the characters properly. I used fonts to show Trello icons for example on my "Rokanban for Trello" channel
- johnmarsdenVisitorHow 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. - johnmarsdenVisitorBump.
- marcelo_cabralRoku GuruOk, 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 - RokuKCRoku Employee
"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.- ABDev25Newbie
I have a similar issue except instead of boxes the Roku is displaying unicode. For items like commas, apostrophes, ampersands, letters with accents, < > - it refuses to display the character. What's very interesting is that Roku displays unicode for { but it does display } as a character. When we input japanese characters it also does not yield a rectangle.
We had coded an MVP which displayed all the proper characters (and rectangles for japanese characters which was fine) - however now as we are pushing directly from Roku we have lost our ability to display characters and it displays unicode instead.
How can we fix this? RokuKC