Solved Help with rendering foreign characters (Korean/Japanese)
#1
In my person profile, I added "aliases" for the TMDB helper and it is pulling in the information correctly. When I hover over the label and it auto scrolls, most of the incoming data is rendered correctly except for the two languages in the title.

I've searched multiple threads regarding unicode foreign chars, tried various font files denoted, and even took Estuary font files and pasted them in to see if that would render it out as most say the Noto files cover most Eastern/Asia fonts/letters.... but to no avail.

Here are some screenshots of what I'm seeing, any ideas on what I can do to resolve it?

Image

So you can see were it goes off the rails... here is the source of the data being pulled in from TMDB:

Image

And here are the font files that are in my folders:

Image

I've updated my font.xml at the end with this information:

xml:

        <!-- Additional Unicode Fonts -->
        <font>
            <name>ArialUnicodeMS</name>
            <filename>Arial_Unicode_MS.TTF</filename>
            <size>22</size>
        </font>
        <font>
            <name>DejaVuSans</name>
            <filename>DejaVuSans.ttf</filename>
            <size>22</size>
        </font>
        <font>
            <name>Arial_Unicode_MS</name>
            <filename>Arial_Unicode_MS.TTF</filename>
            <size>22</size>
        </font>

        <font>
            <name>NotoMono</name>
            <filename>NotoMono-Regular.ttf</filename>
            <size>22</size>
        </font>    
        <font>
            <name>NotoSans-Regular</name>
            <filename>NotoSans-Regular.ttf</filename>
            <size>22</size>
        </font>
        <font>
            <name>Roboto</name>
            <filename>Roboto-Thin.ttf</filename>
            <size>22</size>
        </font>

Any ideas on how I can resolve this issue? Not sure what else I need to do.... got 1 out of 3 to resolve, need to fix the 2 left. 

TY.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embuary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 10% TV Shows: 0% Music: 0%
Reply
#2
You can't resolve it.

Kodi only supports using a single font in label/textbox control. The problem is that True/Open Type fonts have a 16bit lookup table, giving a maximum limit of 65,535 glyphs. However, as of Unicode 16.0, there are 154,998 defined code points, making it impossible for a single font to hold even half the number of glyphs required to render all characters in all language scripts.

There is some work done towards allowing a fallback font to fill in blanks but it seems that further work on it has stalled
https://github.com/xbmc/xbmc/pull/20552
Arctic Fuse 2 - Alpha now available. Support me on Ko-fi.
Reply
#3
Ah ok, damn I thought I was losing my mind on it not rendering or I was doing something wrong.

From the outside looking in, I am really surprised that something like has not been resolved long ago with the 20+ million users (if memory serves Karellen brow beating someone on TMDB) and world wide use still having any type of font rendering issue for languages it still a thing.

I only say that with respect in the sense that kodi has tons of language files and one would be guilty of thinking that this type of thing would have been solved long ago... I guess I'll remove the Aliases because that square box mess is not a good user experience.

I assume there is no way to "detect" the use of CHARS that are invalid and have it drop from the label string??
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embuary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 10% TV Shows: 0% Music: 0%
Reply
#4
Yeah it's pretty frustrating but, as far as I understand, a lot of the font rendering code is quite legacy so it requires a pretty massive rewrite to address it correctly -- which requires someone both knowledgeable and motivated enough to do it.

And considering how essential fonts are to UI, it really needs to be an absolutely rock solid implementation where there is absolute confidence that it works across all the platforms/hardware and without breaking all the unusual corner cases because ending up with a major release where fonts are broken for some users would effectively make Kodi almost unusable. Probably one of the largest projects that could be taken on really.

Quote:I guess I'll remove the Aliases because that square box mess is not a good user experience.

Yeah it becomes a bit of a pointless label if you can't even see half the languages anyway...

If you do want to use it, you can get a decent amount of coverage with the inbuilt arial.ttf system font which ships with Kodi (it is actually based on Open Sans or something like that but, again, for legacy reasons is called arial.ttf)

e.g.
Code:

<font>
<name>font_languages</name>
<filename>arial.ttf</filename>
<size>32</size>
</font>

The obvious problem is that then your Aliases label will need to be a different font from the rest of the labels.

Quote: I assume there is no way to "detect" the use of CHARS that are invalid and have it drop from the label string??

Not in any nice way no.
Arctic Fuse 2 - Alpha now available. Support me on Ko-fi.
Reply
#5
Very good, one rabbit hole that isn't worth going any further on. Understanding the scope, makes sense why it is still operating in a sudo legacy mode.

Appreciate the feedback and help.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embuary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 10% TV Shows: 0% Music: 0%
Reply

Logout Mark Read Team Forum Stats Members Help
Help with rendering foreign characters (Korean/Japanese)0
This forum uses Lukasz Tkacz MyBB addons.