Greetings,
What can I contribute to make i18n support on Roku devices possible?
Thanks!
Greetings,
What can I contribute to make i18n support on Roku devices possible?
Thanks!
To be honest, the main obstacle is that our devices have very limited flash memory space, so including fonts to cover non-Western languages is prohibitive. Many of our currently shipping devices have only 512MB of flash, which has to include the recovery image, main OS image, and space for downloaded applications. Even if we could include more language coverage, there would need to be a major effort to update and validate our text drawing code to handle the requirements for the new languages. We arenât using a web browser engine, this is all custom code in Roku OS.
thanks @RokuBen ! Well it is what it is since 512MB is pretty small and requires an overhaul of existing code base. how about with the soon to come support for typescript, the new SDK they were talking about. Also there is no sort of compression of the fonts?
Anyways you have answered my question and I appreciate it
RSG SDK 2.0 doesnât change the underlying rendering mechanism of the devices, just what language can drive it.
We do compress fonts in both the system image and in package files, but even with that, the non-Western fonts are just too large. Noto Sans JP with just support for Japanese characters compresses to 3.5MB, while Noto Sans, the font with support for most Western languages, is about 350K compressed.
could the audio/video nodes provide a field that emits the currently-rendered caption? ![]()
for such use-cases as trying to support a language that needs a custom/app-provided font?
theyâd have to download their own 3.5MB file at runtime since thatâs too big for the app pkg
.. maybeeee we can use streamingSegmentâs segUrl and segType to fetch captions text ourselves.. but that seems prone to error
How are you referencing those fonts in your application? I would expect this to work unless the font file is relying on features unsupported by the the versions of FreeType and Harfbuzz that weâve compiled in.
I just following the documentation and claude as
if fs.Exists("pkg:/fonts/NotoSansEthiopic.ttf")
WriteLog("SUCCESS: Ethiopic font exists")
else
WriteLog("ERROR: Ethiopic font NOT found")
end if
From what I understand about FreeType and Harfbuzz, they are specifically designed for non Roman scripts and should be able to handle Amharic Geez font types such as Abyssinica SIL.
It just stunning for such a world renowned product Roku is stuck at non-Western languages in this day and age.
I was able to get your code working (after removing the WriteLog recursion), by changing your MainScene.xml to:
<?xml version="1.0" encoding="utf-8" ?>
<component name="MainScene" extends="Scene">
<children>
<Label
id="amharicLabel" text="á°áá ááá"
translation="[200,200]" width="1000" height="100">
<Font role="font" id="ethiopic-font" uri="pkg:/fonts/NotoSansEthiopic.ttf" size="24" />
</Label>
</children>
</component>
The font attribute on label only allows specifying internal fonts. You need a Font child node (see Font) to specify an font in your package.
The docs donât really explain this well outside of a quick note on an unrelated page, but the role="font" atttribute is essential. Thatâs telling the XML reader the child Font node is applied to the âfontâ field of the parent. Without that, you donât get the connection and it doesnât apply.
We only provide global settings for language choice for languages that we support in our own OS translations. It would be confusing to consumers to have them pick a language and not have that show correctly in all of our internal UI. We do support many languages for default audio format.