jellyfin / jellyfin-roku

The Official Roku Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
412 stars 129 forks source link

Unable to display non-Latin titles for Media #285

Open neilsb opened 3 years ago

neilsb commented 3 years ago

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

image

DHandspikerWade commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

neilsb commented 2 years ago

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 commented 1 year ago

Any update on this function?

FarangFlix commented 1 year ago

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 commented 1 year ago

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 https://github.com/iBicha/playlet/pull/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:

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)