Wine Tips
TyeYeah Lv4

Tips for dealing wine font or encoding problems.

Solve Garbled Text

Interface

After installation of Wine, the execution and configuration interfaces may be garbled.
You need to add the missing fonts.

Copy all font files under C:/WINDOWS/Fonts/ on windows to /usr/share/wine/fonts/ on Linux, then this can be solved. Get a copy to /usr/share/fonts/ if it doesn’t work, and:

1
2
3
$ sudo mkfontscale # generate fonts info
$ sudo mkfontdir # generate fonts directory
$ sudo fc-cache -fv # refresh system fonts cache

Software

If the software you run appears grabled text, you also need to copy windows fonts, to ~/.wine/drive_c/windows.

Create a file named xxx.reg:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"Arial"="simsun"
"Arial CE,238"="simsun"
"Arial CYR,204"="simsun"
"Arial Greek,161"="simsun"
"Arial TUR,162"="simsun"
"Courier New"="simsun"
"Courier New CE,238"="simsun"
"Courier New CYR,204"="simsun"
"Courier New Greek,161"="simsun"
"Courier New TUR,162"="simsun"
"FixedSys"="simsun"
"Helv"="simsun"
"Helvetica"="simsun"
"MS Sans Serif"="simsun"
"MS Shell Dlg"="simsun"
"MS Shell Dlg 2"="simsun"
"System"="simsun"
"Tahoma"="simsun"
"Times"="simsun"
"Times New Roman CE,238"="simsun"
"Times New Roman CYR,204"="simsun"
"Times New Roman Greek,161"="simsun"
"Times New Roman TUR,162"="simsun"
"Tms Rmn"="simsun"

Then run

1
$ regedit xxx.reg # or 'wine regedit xxx.reg'

It’s from blog of others and I didn’t get text rightly displayed, so I tried this:

1
2
3
4
5
6
7
8
9
10
11
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Lucida Sans Unicode"="wqy-microhei.ttc"
"Microsoft Sans Serif"="wqy-microhei.ttc"
"MS Sans Serif"="wqy-microhei.ttc"
"Tahoma"="wqy-microhei.ttc"
"Tahoma Bold"="wqy-microhei.ttc"
"SimSun"="wqy-microhei.ttc"
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"

Succeeded. The edition of registry font link works well.

Winecfg

Later…

Powered by Hexo & Theme Keep
Total words 135.7k