Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-latin characters support in video titles #229

Open
lotusbun opened this issue Dec 19, 2023 · 2 comments
Open

Non-latin characters support in video titles #229

lotusbun opened this issue Dec 19, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@lotusbun
Copy link

Thrilled to see an app like this for Roku! Very grateful for your work and I wish I could contribute.

Currently I am encountering an issue where videos with non-Latin characters in their titles don’t render properly. For example, Japanese and Arabic titled videos appear as generic unicode box characters.

This makes some content hard to find, and I was wondering if there is progress on it.

@mintdotco
Copy link

Same thing for emojis, tons of channels have emojis in their title and yeah

@iBicha iBicha added the enhancement New feature or request label Dec 19, 2023
@iBicha
Copy link
Owner

iBicha commented Dec 19, 2023

Thanks for creating the issue. This topic has been in the works for quite sometime now, and I share your frustration, since some of my feed is in Arabic, so it's hard to see what's what. It helps a bit that the home page and the bookmarks are also on the web app, which does render text correctly. That being said, let's dive into it.

The problem is that natively, Roku devices do not render non-Latin characters by default (lack of fonts) and do not support RTL or bidirectional text. Similarly, Color Emojis are also not supported. So this is not a Playlet issue per se, but any app on Roku (except select apps like Youtube - they get special treatment).

I've experimented with different solutions (some are explained here) but I'll refresh the options we have in this issue:

Server side rendering

This is basically rendering the text on a server. I have a prototype that does exactly this from almost a year ago, which shows playlet displaying both CJK script and Arabic script. The downside is that we will need servers to do this. Playlet currently does not have servers, so introducing them for just text rendering is a big cost. Other apps (like Jellyfin or Plex) already have servers, and they leverage them to render text (for example to render subtitles by "burning" them directly on the video.)

Render on Roku

This is possible with limitations. First, font files are pretty large, and mostly do not the limited Roku storage. They need to be downloaded to cache or external storage attached to Roku. Additionally, Roku doesn't know how to render RTL or bidirectional. So while CKJ might work, Arabic script will still look like crap, because it is not "shaped" properly.
This approach will also be limited with when a text has multiple languages and/or emojis. There's isn't a system to manage many font files with fallbacks. I can confidently say this approach won't work.

Render on web app

This is an approach I did not try yet, but it feels possible. Since Playlet has a web app that runs in the browser, it should be in theory be possible for Roku to "ask" the web app to render text, and the web app would respond with an image of the rendered text. In this case, the web app acts as a server. This however, has a few limitations:

  • The web app needs to be open in your browser
  • Websocket needs to be setup between Playlet and the web app, so that Roku can make these rendering requests
  • The web app wouldn't be "stable": the browser tab can be closed, or the phone can sleep. Then these text rendering requests would fail.

Overall, I feel I exhausted all the options, but none of the solutions are perfect, and each of them is too complicated.
I do feel that someday I can create a system for rendering text for both titles and labels in general, and also text for subtitles. And then share that system between a rendering server and the web app (that way there are options) but something like this is going to take time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants