Can you replace the default CJK fonts?

server-synology

#1

Can you replace the default 2 sets of CJK fonts(NotoSansCJK-Bold,NotoSansCJK-Regular) in the installation package? The two sets of fonts I copied to the computer, simply can not be displayed, and the characters are not all.

I know that Google has provided a free CJK font. You can see it here. Https://www.google.com/get/noto/help/cjk/

As far as I know, this Super OpenType/CFF Collection contains all Chinese, Japanese and Korean characters.
https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJK.ttc.zip


#2

In fact, someone who knows a little about the linux command can easily replace it, or add more fonts.
sudo chmod -R 777 /var/packages/Plex\ Media\ Server/target/Resources/Fonts
But I think most people may not know how to do.


#3

If you can help me justify replacing the current fonts, I can get the default set replaced.


#4

In the directory,
/var/packages/Plex Media Server/target/Resources/Fonts
You can find 2 CJK font files
NotoSansCJK-Bold.ttc
NotoSansCJK-Regular.ttc
As a result of my tests, these 2 fonts are corrupted, and even if they are good, these 2 fonts also display errors in some Chinese characters.
My solution is to delete these 2 fonts,And replace them with this font.
https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJK.ttc.zip
This is a Google free font. comprehensively cover Simplified Chinese, Traditional Chinese, Japanese, and Korean in a unified font family.You can see it here. Https://www.google.com/get/noto/help/cjk/
When I do this, all the text in the subtitle file is displayed correctly


#5

Although the replaced font file is very large, there are more than 100 M, because it contains almost all of the CJK text, but I think no one will care about the NAS is occupied by more than 100M space


#6

In fact, in this directory, you can add any fonts you want, and the plex will recognize them correctly and display the fonts correctly when the sub are burned. However, most fonts require payment or only personal use.
I installed 178 fonts myself,enough to handle 99% of SSA/ASS subtitles

The only problem is how to set the default font when burning .SRT subtitles (in ROKU)? In my these fonts, I found that the default font is Microsoft YaHei (but this is obviously not specified by the Plex, because this is the default Chinese font on Windows), in which file can I define this default value?


#7

Provides some renderings when the fonts are displayed correctly. This is great, just like playing ASS files using potplayer on windows.



#8

In addition, I can find a file related to the fonts here. It was automatically produced after uploading the font files.


#9

@iviso said:
In the directory,
/var/packages/Plex Media Server/target/Resources/Fonts
You can find 2 CJK font files
NotoSansCJK-Bold.ttc
NotoSansCJK-Regular.ttc
As a result of my tests, these 2 fonts are corrupted, and even if they are good, these 2 fonts also display errors in some Chinese characters.
My solution is to delete these 2 fonts,And replace them with this font.
https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJK.ttc.zip
This is a Google free font. comprehensively cover Simplified Chinese, Traditional Chinese, Japanese, and Korean in a unified font family.You can see it here. Https://www.google.com/get/noto/help/cjk/
When I do this, all the text in the subtitle file is displayed correctly

Can you help me with a discrete breakdown and/or create something which will demonstrate the corruption ?
I ask this because not everyone will be able to understand by simple inspection. If we can objectify it, replacing the font will fix it for all users on all platforms.


#10

Easy, I copyed the default CJK font to the windows , because this is the .TTC format fonts,if everything goes well,it can be installed on the windows. But I got this issue.

It means “Not a valid font file”.And in actual use, if PLEX uses this default font, many Chinese characters are displayed incorrectly。Maybe it seems to you that they don’t seem to display garbled characters, but when we look at it, it shows the wrong text.


#11

I am multi-lingual thanks. Granted characters and symbols from other languages often do not make sense to the monolinguistic but I understand the significance.

Making the change is trivial (obviously).
The second part of this is also creating a new QA step to verify the font. While it should never get corrupted, it somehow did. I want to make sure it doesn’t happen again.

Can you show me, with something I can recreate for the English-speaking staff they can do a visual comparison against even if one symbol per line?


#12

I’ve checked with the Windows team. Are you using UTF-8 encoding ? PMS only supports UTF-8.
There is that whole “Code Page” thing which I don’t, (Linux guy here), understand about Windows


#13

The subtitles are basically UTF-8 encoded. It is a bit difficult to give you examples because Chinese is not made up of letters. Each word is a specific character. I can only say that some text cannot be displayed correctly. Perhaps the default installation CJK fonts is not include all Chinese characters.
Due to my limited English , I directly copied a section of Wikipedia to you.


Chinese is written almost exclusively in Chinese characters. It requires over 3,000 characters for general literacy, but up to 40,000 characters for reasonably complete coverage. Japanese uses fewer characters — general literacy in Japan can be expected with 1,945 characters.

In addition, the default installation of the two font files, I downloaded them from the google website can be installed on the windows.
https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJK-Bold.ttc.zip
https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJK-Regular.ttc.zip

Maybe the two fonts you have kept are damaged?


#14

Well, for the sake of clarity, I did a simple example, delete a CJK font that I installed, then burn SRT subtitles (SRT does not specify the font), and then you can easily see that when displaying Chinese, Missing text is replaced by other fonts



#15

That is incredibly clear. Thank you.

For the last piece of the information, can you please show me what the correct subtitle will look like with the valid font file in place?


#16

Since Google’s Super OpenType/CFF Collection covers all CJK characters, I hope that you can use it as the default font.


#17

I don’t know the true principle. I only know that after uploading the complete CJK font package below (from Microsoft ,Not open source,but you can use it for test ), all font problems are solved. Chinese Japanese and Korean can be displayed correctly。


(When I remove all preset font files, the same effect can be achieved with NOTOSANS-CJK fonts. It’s just that NOTOSANS-CJK can’t be the default font if I have a lot of text installed on my system. This goes back to another question, how to make a font become the default font)
https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJK.ttc.zip
Google’s CJK font can also display Western European text, Greek letters


#18

In China, NAS is very popular. SYNOLOGY and QNAP are two companies from China. However, most Chinese people do not have good English(Japanese and Koreans are also not good at English). Therefore, there are very few Chinese people in the official forum to consult. if PLEX can perfectly display CJK font. It would be great. As we Know that China, Japan and South Korea are the 2nd, 3rd and 10th economies in the world,This is a big market!


#19

I own both Synology (DS1815+) and QNAP (TVS-1282). My duties here at Plex are to provide customer and development support for those platforms.
Synology and QNAP are the two most popular NAS solutions for Plex without question.

I have written up this issue for you, detailing how you solved it for yourself. I linked this thread to that Engineering Problem Report so do ask you to leave the contents of this thread as they currently are.

I personally wish to thank you for going above and beyond to help me. You’ve made my task of problem reproduction and proposed solution 1000x easier. Thank you.

I cannot anticipate how quickly this will be fixed but given it is a static support file to PMS, it should be trivial to update and verify. I will keep you advised. If the Engineering team needs more information, they will reach out to you here through the forum.

Thanks again,
C.


#20

Hello, I didn’t know much about fonts before posting this post. After I learned about it through WIKI, I discovered that I might have problems with my previous ideas. That is, if your two default CJK fonts are not corrupted, but the reason why I display the Chinese subtitles incorrectly may be this:
For example, if the default font is this, NotoSansCJK-Regular.ttc. According to Google’s description,it include four font instances: Noto Sans CJK {JP, KR, SC, TC}。 and In linux system, there is a priority inside the TTC file,The default display of this CJK font is Noto Sans CJK JP。This means that all Chinese characters are displayed in Japanese fonts.This may be the reason why my Chinese looks so weird。
Under the Linux system(NOT DSM)。
**sudo vim /etc/fonts/conf.d/64-language-selector-prefer.conf **
`<?xml version="1.0"?>

<alias>

	<family>sans-serif</family>

	<prefer>
<family>Noto Sans CJK JP</family>

		<family>Noto Sans CJK SC</family>

		<family>Noto Sans CJK TC</family>

	</prefer>

</alias>

<alias>

	<family>monospace</family>

	<prefer>

		<family>Noto Sans Mono CJK JP</family>

		<family>Noto Sans Mono CJK SC</family>

		<family>Noto Sans Mono CJK TC</family>

	</prefer>

</alias>

`
As you can see, JP takes precedence over SC.