GUI中文字体乱码解决方案(GUI Chinese font display garbled square problem solution)


Recommended Posts

Find a font file that supports Chinese, such as ‪C:\Windows\Fonts\msyh.ttc in the Windows system directory

You can fix this by copying the file into the/usr/share/fonts/TTF or  \usr\lib64\ Firefox \fonts directory,

Also hope developers to add support for Chinese font files@JavyLiu @lyqalex.

 

找到一个支持中文的字体文件,例如Windows系统目录下的‪C:\Windows\Fonts\msyh.ttc
将文件拷贝到/usr/share/fonts/TTF 或者 \usr\lib64\firefox\fonts目录中即可解决这个问题,
同时希望开发者@JavyLiu @lyqalex 添加支持中文字体文件.

Edited by anye
Link to comment
  • anye changed the title to GUI中文字体乱码解决方案(GUI Chinese font display garbled square problem solution)
  • 1 year later...

太好了,終於有解決辦法。這貼一定要置頂,每個新來的unraid菜鳥都是必須的。

 

為了後來者,我也說明多一點。

1> 在c:\Windows\Fonts\ 找繁簡字體如下:

msjh.ttc (繁體)

msjhl.ttc (繁體幼)

msjhbd.ttc (繁體粗)

msyh.ttc (簡體)

msyhl.ttc (簡體幼)

msyhbd.ttc (簡體粗)

2> 先把以上6個檔案拷貝到 /mnt/user/isos/fonts/

3> 打開unraid主頁面的Terminal,及試試看unraid基本自帶字體情況

ls -la /usr/share/fonts/TTF/

4> 拷貝isos/fonts內的字體到usr/share去

cp /mnt/user/isos/fonts/*.ttc /user/share/fonts/TTF/

5> 再看看有否加進去

ls -la /usr/share/fonts/TTF/

如果看到了6個檔案都新加了進去便完成,unraid自帶原生的firefox就可以看到中文了。

 

但是這時,firefox只能看中文,不能輸入中文。Firefox也不能儲存設定,重起後設定就恢復原狀。不知道有沒有高人有解決方案?

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Edited by speedylynx
  • Like 1
Link to comment

Unraid 重起後,Firefox恢復原設置,中文字體也沒有了。

 

所以,要在Plugins上的User Scripts中,加一個新的“ADD NEW SCRIPT”,並設定為 "At Startup of Array"。內容如下:

#!/bin/bash

cp /mnt/user/isos/font/*.ttc /usr/share/fonts/TTF/

名稱如:Copy_Chinese_fonts_to_UnraidWebInterface_Firefox

 

總結:

1> Unraid官方沒做到位啊,這些基本中文支援都沒有,要中文用家折騰這些東西。

2> 字體上好似6選1便可,筆者懶惰,不想折騰選字體,就索性放6個進去。

3> 在isos內放fonts,只是筆者覺得方便,大家可以隨便更改存放fonts的位置。

 

 

 

 

 

 

Edited by speedylynx
  • Like 1
Link to comment

網上有幾個中文在線輸入法,大家可以搜搜。未有解決辦法前,可以湊合用。

 

如下:

速成輸入法

https://www.simpleinput.com

 

可能有人會問,為甚麼要折騰Unraid OS GUI Mode呢?遠端網頁不香嗎?筆者覺得unRAID OS GUI Mode有他的實用性,尤其是系統設定初期/關鍵時刻,或設置網絡如openwrt或網口時,GUI Mode可以救你一命,但如果不能駛用中文,這連看看網上中文說明或硬盤上的中文檔案/文件夾等都做不到,問題就變得非常複雜了。

Link to comment
On 9/3/2021 at 1:07 AM, anye said:

Find a font file that supports Chinese, such as ‪C:\Windows\Fonts\msyh.ttc in the Windows system directory

You can fix this by copying the file into the/usr/share/fonts/TTF or  \usr\lib64\ Firefox \fonts directory,

Also hope developers to add support for Chinese font files@JavyLiu @lyqalex.

 

找到一个支持中文的字体文件,例如Windows系统目录下的‪C:\Windows\Fonts\msyh.ttc
将文件拷贝到/usr/share/fonts/TTF 或者 \usr\lib64\firefox\fonts目录中即可解决这个问题,
同时希望开发者@JavyLiu @lyqalex 添加支持中文字体文件.

使用终端,并没有找到/usr/share/fonts/TTF 文件夹,自己创建?然后怎么把本地的字库拷贝进去,cp命令怎么写呢?我不太会

Link to comment
  • 2 weeks later...
On 12/19/2022 at 3:05 AM, speedylynx said:

你可能找錯終端,是主頁右上角那裡的。

 

文件夾本身就有的,不用創建。

 

你把上面的命令行拷貝一下,然後在終端上直接貼上去便成

 

字體在windows上找,提議你拷貝到isos文件夾上,這個文件夾應該大家都做了"共享"給windows使用。

这两个目录确实是没有的

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.