幾種解決linux中wine/crossover字體問題的方法。linux
Windows支持字體連接:當一種字體中不存在某個字時,能夠嘗試從另外一個字體文件中尋找相應的字形。git
經過註冊表指定代替的字體以達到wine程序使用linux已經安裝的字體的目錄。github
crossover中打開「運行命令「,運行regedit(或者選中容器後在右鍵菜單中選擇「運行命令「)便可打開註冊表程序。shell
若是仍有部分字體出現方塊,嘗試在wine配置(winecfg程序)中將系統改成其餘版本(如xp)。windows
fonts.reg文件示例——使用SourceHanSansCN-Medium.otf代替windows字體。
下載reg文件緩存
如要使用其餘字體自行更換爲具體字體文件名(例如文泉驛微米黑wqy-microhei.ttc
),提示:在/usr/share/fonts
下可找到該字體文件。ide
REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink] "System"="SourceHanSansCN-Medium.otf" "Sans Serif"="SourceHanSansCN-Medium.otf" "Arial"="SourceHanSansCN-Medium.otf" "Arial Black"="SourceHanSansCN-Medium.otf" "Arial CE,238"="SourceHanSansCN-Medium.otf" "Arial CYR,204"="SourceHanSansCN-Medium.otf" "Arial Greek,161"="SourceHanSansCN-Medium.otf" "Arial TUR,162"="SourceHanSansCN-Medium.otf" "Microsoft Sans Serif"="SourceHanSansCN-Medium.otf" "Microsoft YaHei"="SourceHanSansCN-Medium.otf" "微軟雅黑"="SourceHanSansCN-Medium.otf" "MS Sans Serif"="SourceHanSansCN-Medium.otf" "MS Shell Dlg"="SourceHanSansCN-Medium.otf" "MS Shell Dlg 2"="SourceHanSansCN-Medium.otf" "Tahoma"="SourceHanSansCN-Medium.otf" "Tahoma Bold"="SourceHanSansCN-Medium.otf" "SimSun"="SourceHanSansCN-Medium.otf" "SimHei"="SourceHanSansCN-Medium.otf" "SimKai"="SourceHanSansCN-Medium.otf" "SimFang"="SourceHanSansCN-Medium.otf" "宋體"="SourceHanSansCN-Medium.otf" "新細明體"="SourceHanSansCN-Medium.otf" "MingLiU"="SourceHanSansCN-Medium.otf" "PMingLiU"="SourceHanSansCN-Medium.otf" "DFKai-SB"="SourceHanSansCN-Medium.otf" "FangSong"="SourceHanSansCN-Medium.otf" "KaiTi"="SourceHanSansCN-Medium.otf" "Microsoft JhengHei"="SourceHanSansCN-Medium.otf" "NSimSun"="SourceHanSansCN-Medium.otf" "Lucida Sans Unicode"="SourceHanSansCN-Medium.otf" "Courier New"="SourceHanSansCN-Medium.otf" "Courier New CE,238"="SourceHanSansCN-Medium.otf" "Courier New CYR,204"="SourceHanSansCN-Medium.otf" "Courier New Greek,161"="SourceHanSansCN-Medium.otf" "Courier New TUR,162"="SourceHanSansCN-Medium.otf" "FixedSys"="SourceHanSansCN-Medium.otf" "Helv"="SourceHanSansCN-Medium.otf" "Helvetica"="SourceHanSansCN-Medium.otf" "Times"="SourceHanSansCN-Medium.otf" "Times New Roman CE,238"="SourceHanSansCN-Medium.otf" "Times New Roman CYR,204"="SourceHanSansCN-Medium.otf" "Times New Roman Greek,161"="SourceHanSansCN-Medium.otf" "Times New Roman TUR,162"="SourceHanSansCN-Medium.otf" "Tms Rmn"="SourceHanSansCN-Medium.otf"
微調字體渲染的註冊表文件adjust-fonts.reg(一樣按上面的方法導入註冊表便可):字體
REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\X11 Driver] "ClientSideAntiAliasWithCore"="Y" "ClientSideAntiAliasWithRender"="Y" "ClientSideWithRender"="Y" [HKEY_CURRENT_USER\Control Panel\Desktop] "FontSmoothing"="2" "FontSmoothingType"=dword:00000002 "FontSmoothingGamma"=dword:00000578 "FontSmoothingOrientation"=dword:00000001
掛載windows的C:盤,例如其被掛載在/windows
code
ln -s /windows/Windows/Fonts /usr/share/fonts/WindowsFonts
而後從新生成字體緩存:ci
fc-cache
或者,將Windows的字體複製到/usr/share/fonts
:
mkdir /usr/share/fonts/WindowsFonts cp /windows/Windows/Fonts/* /usr/share/fonts/WindowsFonts chmod 755 /usr/share/fonts/WindowsFonts/*
而後從新生成字體緩存:
fc-cache
把相關字體(如simsun.ttc)放到~/.wine/drive_c/windows/Fonts/
目錄。