Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
ramakanth
Level 7

Roku support for arabic text

does roku has support for arabic text? we are planning for a arabic localized app for roku, but there is no proper information.
0 Kudos
5 Replies
Roku Employee
Roku Employee

Re: Roku support for arabic text

You will need to create a custom UI using roScreen (best) or roImageCanvas (less favorable, but possibly easier to create) and include an Arabic True Type Font or Open Type Font.

- Joel
0 Kudos
ramakanth
Level 7

Re: Roku support for arabic text

Can we use the arabic true type font with respect to roVideoScreen? our main problem is with respect to subtitles in the video as majority of our users are arabic origin we want to provide them with the arabic subtitles.

As far as i know here is the working example for english subtitles, if i give arabic subtitle .srt file the system doesn't understand the format and display square boxe for each char. can you please guide me with a snippet to achieve the arabic subtitles with respect to .srt file.

video = CreateObject("roVideoScreen")

videoclip = CreateObject("roAssociativeArray")
videoclip.StreamBitrates = bitrates
videoclip.StreamUrls = urls
videoclip.StreamQualities = qualities
videoclip.StreamFormat = streamformat
videoclip.Title = title
print "srt = ";srt
if srt <> invalid and srt <> "" then
videoclip.SubtitleUrl = srt
end if
video.SetContent(videoclip)
video.show()

Thanks,
Ramakanth.G
0 Kudos
Roku Employee
Roku Employee

Re: Roku support for arabic text

I believe you can, using the roCaptionRenderer component, in conjunction with roScreen and roVideoPlayer componenets:

http://sdkdocs.roku.com/display/sdkdoc/roCaptionRenderer

Look at the example on that page where a font is loaded. You should be able to load any TTF or OTF font. I would suggest trying to find font files that are small in file size if possible.

- Joel
0 Kudos
ramakanth
Level 7

Re: Roku support for arabic text

Hi Joel,
Thanks for guiding me in the right direction. I have used couple of arabic ttf files, right now i am using arial.ttf for testing the arabic subtitles, I am able to render the arabic subtitles for the movie i am streaming which is good news, but it has two major issues.
1. first is as i see the roku firmware is not able to handle the carriage return in arabic subtitle files and it is showing as box please find the attached image over drive for your reference.
https://drive.google.com/file/d/0B9SpvR ... sp=sharing
2. Need to reverse all the text which I am rendering now, arabic people read from right to left, I have raised separate thread for that hopefully you will guide me in proper direction for that. here is the link to that post.
viewtopic.php?f=34&t=88951

here is the link for the screen shots of the carriage return mishandling in subtitles:
https://drive.google.com/file/d/0B9SpvR ... sp=sharing

here is the link for the project which i made for testing the arabic subtitle support.
https://drive.google.com/file/d/0B9SpvR ... sp=sharing

Movie conversation start's after 2 minutes, so please wait until that time to see subtitles, i didn't implement fastforward functionality. will be waiting for the proper approach/solutions for this problems

Thanks,
Ramakanth.G
0 Kudos
Roku Employee
Roku Employee

Re: Roku support for arabic text

For the carriage return, I would attempt to identify what that character actually is, and replace it with a chr(10) or replace it with a space. See: ifStringOps Others have already discussed the string-reversal issue. If I were you I would do all of that including the string reversal on my server (if possible) and then deliver the content with the strings ordered the way you want them, with the carriage returns replaced or stripped out.

- Joel
0 Kudos