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

Unable to display non-Latin titles for Media #285

Open
neilsb opened this issue Nov 6, 2020 · 10 comments
Open

Unable to display non-Latin titles for Media #285

neilsb opened this issue Nov 6, 2020 · 10 comments
Labels
bug Something isn't working

Comments

@neilsb
Copy link
Member

neilsb commented Nov 6, 2020

Currently default fonts on Roku are non-unicode, meaning any non-Latin text is displayed as boxes

image

@neilsb neilsb added the bug Something isn't working label Nov 6, 2020
@DHandspikerWade
Copy link

This is going to be a bigger problem as Roku has poor Unicode support. Largely only supporting Latin characters. The work around Plex uses for it has been deprecated by Roku. Might be able to use roBitmap?

@neilsb
Copy link
Member Author

neilsb commented Feb 12, 2021

I'd had a quick look at this before, the got some hope out of the response from the Roku employee in the thread below:

I did try it with a few fonts without much success, however MS Gothic did work locally, and displayed the titles correctly for all the test media I have. However (any license issues aside) it's a horrible font and looked terrible :)

No idea what a "Unicode mapping table" is, or how to create one, which may be way to identify suitable fonts.

That said, the files for fonts with full unicode support seem to be fairly large, and Roku apps have a pretty conservative package size limit. While we're nowhere near that right now, as the client matures I expect we may well increase the package size with additional graphic resources, etc.

@neilsb
Copy link
Member Author

neilsb commented Feb 22, 2021

So, actually it's as simple as using the right font.

image

This Google Noto Sans CJK JP. The problem is this font it just under 16Mb in size, and the maximum channel size is 4Mb. It could be downloaded to Roku filesystem and used if available, however unless the user has a device that supports external storage (SD card or USB) then the data is not persisted after (at best) a reboot.

Would be nice if Roku were to include some slightly more comprehensive fonts in the OS.

@Lorde627
Copy link

So, actually it's as simple as using the right font.

image

This Google Noto Sans CJK JP. The problem is this font it just under 16Mb in size, and the maximum channel size is 4Mb. It could be downloaded to Roku filesystem and used if available, however unless the user has a device that supports external storage (SD card or USB) then the data is not persisted after (at best) a reboot.

Would be nice if Roku were to include some slightly more comprehensive fonts in the OS.

Hey there,I'm using a Roku TV,I can pulg the USB devices,is there any method to make Jellyfin or other apps to support CJK font?

@xiNeRoar
Copy link

So, actually it's as simple as using the right font.

image

This Google Noto Sans CJK JP. The problem is this font it just under 16Mb in size, and the maximum channel size is 4Mb. It could be downloaded to Roku filesystem and used if available, however unless the user has a device that supports external storage (SD card or USB) then the data is not persisted after (at best) a reboot.

Would be nice if Roku were to include some slightly more comprehensive fonts in the OS.

Could you please give a tutorial on how to do this? I am a Chinese user who likes to add CJK font into the Roku filesystem too.
It is very much appreciated if you could teach me how to get this right. Thank you very much!

@FarangFlix
Copy link

Is there a solution for this or no? I see a couple of people asking with no response.

@neilsb
Copy link
Member Author

neilsb commented Apr 3, 2022

There is a work in progress. But nothing in place yet. First version will likely work for Roku with USB support, and a subsequent version will allow the Roku to download the font font when required (though there are issues with this approach)

@xiNeRoar
Copy link

Any update on this function?

@FarangFlix
Copy link

FarangFlix commented Jul 27, 2022

Any update on this function?

The only solution I had was to switch to AndroidTV. It appears that there are different programmers for the Jellyfin clients depending on the device. The one who does AndroidTV client did an excellent job. But whatever the client, hats off to these volunteers.

@iBicha
Copy link
Contributor

iBicha commented Jan 23, 2023

I can only see two ways to solve this:

Server side rendering

We could develop a server that renders text into a PNG. This server could be reusable across many Roku apps.
PoC here iBicha/playlet#40
(for the server, it's kinda simple, it's an express app, and the rendering logic is based on https://github.com/tkrkt/text2png with some modifications)
Rendering using canvas is fairly fast, and Roku caches images well, so I feel this will be ok. But it does require this additional thing deployed.

Render it on Roku

Edit: I've tried to work on this, but any attempt to bring a wasm library into roku resulted either in a label count limit or a stack overflow (thread) so I don't see this as a doable solution.

Now this is a crazier idea that I'm not sure if it will work or not, but:

  • Develop a native rendering lib (in rust for example) that renders text to an image
    • There are few good libs out there for text shaping, layout and rendering (one particularly useful lib is HarfBuzz)
  • Build the native lib into a wasm binary
  • Use https://github.com/MotleyCoderDev/wasm2brs
  • Use the generated BRS code to render the text

Fonts will still need to be downloaded on demand because of their size.
This feels such an overkill of an approach (and might or might not be feasible after all, it might turn out to have such poor performance that it's not worth it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants