62 wine
在许多情况下,Windows 程序在 Wine 中运行正常,但仍然存在令人讨厌的外观问题。
如何让 Wine 中的东西看起来更好,尤其是字体?
小智 83
下面的解决方案将在playonlinux取得的进展的背景下考虑- 现在它非常能够提供开箱即用,至少对于首次发布此答案时考虑的程序,例如 foobar2000,需要的调整Wine 应用程序的最佳 GUI 外观。
如果您不喜欢 Playonlinux 并且只直接使用 Wine,请随时评论和/或编辑有关 Wine 唯一问题的答案。
考虑Wine 中的 GTK 主题:请参阅此答案的最后一部分。
winefontssmoothing_en.sh
并使用命令在终端中运行bash winefontssmoothing_en.sh
:Run Code Online (Sandbox Code Playgroud)#!/bin/sh # Quick and dirty script for configuring wine font smoothing # # Author: Igor Tarasov <tarasov.igor@gmail.com> WINE=${WINE:-wine} WINEPREFIX=${WINEPREFIX:-$HOME/.wine} DIALOG=whiptail if [ ! -x "`which "$WINE"`" ] then echo "Wine was not found. Is it really installed? ($WINE)" exit 1 fi if [ ! -x "`which "$DIALOG"`" ] then DIALOG=dialog fi TMPFILE=`mktemp` || exit 1 $DIALOG --menu \ "Please select font smoothing mode for wine programs:" 13 51\ 4\ 1 "Smoothing disabled"\ 2 "Grayscale smoothing"\ 3 "Subpixel smoothing (ClearType) RGB"\ 4 "Subpixel smoothing (ClearType) BGR" 2> $TMPFILE STATUS=$? ANSWER=`cat $TMPFILE` if [ $STATUS != 0 ] then rm -f $TMPFILE exit 1 fi MODE=0 # 0 = disabled; 2 = enabled TYPE=0 # 1 = regular; 2 = subpixel ORIENTATION=1 # 0 = BGR; 1 = RGB case $ANSWER in 1) # disable ;; 2) # enable MODE=2 TYPE=1 ;; 3) # enable cleartype rgb MODE=2 TYPE=2 ;; 4) # enable cleartype bgr MODE=2 TYPE=2 ORIENTATION=0 ;; *) rm -f $TMPFILE echo Unexpected option: $ANSWER exit 1 ;; esac echo "REGEDIT4 [HKEY_CURRENT_USER\Control Panel\Desktop] \"FontSmoothing\"=\"$MODE\" \"FontSmoothingOrientation\"=dword:0000000$ORIENTATION \"FontSmoothingType\"=dword:0000000$TYPE \"FontSmoothingGamma\"=dword:00000578" > $TMPFILE echo -n "Updating configuration... " $WINE regedit $TMPFILE 2> /dev/null rm -f $TMPFILE echo ok
在终端中选择第三个选项 - 使用箭头,然后使用 Tab 键选择确定并“输入”
(来源在这里)
winecfg
(Wine/Configure Wine/Desktop Integration) 中安装 windows msstyle 文件,例如"Luna"或"Royale"。winecfg
(Wine/Configure Wine/Graphics) 中增加屏幕分辨率,这将使一般细节(包括字体)变大(如果这是您需要的:在我的笔记本电脑上,默认情况下,wine 程序的外观细节太小) 但是上面的图片是在启用字体平滑后拍摄的。这是最重要的动作,因为我能够测试。由于我必须在某个时候重新安装 Wine,因此我还必须重新启动此处的所有程序。使用所有其他解决方案(包括按照Shauna的回答中的建议安装所有字体- 这是非常可取的,并被视为该问题解决方案的一部分) - 除了字体平滑之外,Foobar2000 看起来像这样:
字体平滑后:
重要提示:更改设置winecfg
可能会重置字体平滑,因此最好最后运行它,或者在字体看起来难看时重新启用它。
(由提到这个更近的答案),结果可能会由于Linux桌面和应用场合的不同而有所不同。Wine 中的 GTK 主题似乎是一个偏好问题,因为 Windows 程序上的 GTK 主题是否比 Windows 主题看起来更好是有争议的。
Foobar2000 示例:
在 Ubuntu 中:
在基本操作系统中:
默认情况下,与 Playonlinux 中的 msstyle Luna 相比没有太大的改进:
在 Playonlinux 中,即使有最新的 Wine-staging 版本可用,GTK 主题似乎也不存在,因为在 Playonlinux 中将Wine-staging 版本添加到虚拟驱动器,“Staging”选项卡出现在该驱动器的 Wine 配置中,但“Enable GTK Theming”是变灰。
那是因为需要的不是任何 暂存版本的wine,而是winehq-staging
无法在Playonlinux中安装的包。
更新:我看到在 Playonlinux 的更高版本中,在此编辑之日(2018 年 11 月),Playonlinux 中的 wine 暂存版本根本不显示上述灰色的 gtk 选项。
Sha*_*una 31
确保安装字体:
winetricks allfonts
Run Code Online (Sandbox Code Playgroud)
字体问题通常是由于程序使用了 Linux 或 Wine 未附带的 TrueType 字体。通过 Winetricks(与当前版本的 Wine 一起提供)安装它们,应该可以解决您的字体问题。
首先...本节帮助我配置 Wine 以获得正确的 Photoshop CS6 外观。
有时效果winetricks allfonts
不是很好。有时,如果某些字体已更新但尚未反映在 winetricks 脚本中,则您可能会收到有关 SHA1 总和的错误。
Droid 字体存储库中当前的 winetricks 版本指向http://android.git.kernel.org,由于黑客原因,该版本目前已关闭:
sudo gedit /usr/bin/winetricks
Run Code Online (Sandbox Code Playgroud)
寻找这样的东西:
load_droid()
{
# See http://en.wikipedia.org/wiki/Droid_(font)
Run Code Online (Sandbox Code Playgroud)
并将第 6867 行周围的 DROID_URL 更改为:
DROID_URL='https://www.codeaurora.org/gitweb/quic/la/?p=platform/frameworks/base.git;a=blob_plain;f=data/fonts/'
Run Code Online (Sandbox Code Playgroud)
我还必须将位于 6059 行附近的字体“Droid Sans Fallback”的 SHA1 总和更改为:
do_droid DroidSansFallback.ttf "Droid Sans Fallback" 2f8a266389a8e22f68f402b775731eec6b760334
Run Code Online (Sandbox Code Playgroud)
如果您收到任何其他错误,请找到有问题的“字体名称”并计算新的 SHA1 并修改 winetricks 中的值:
cd ~/.cache/winetricks/font-folder
sha1sum font-name
sudo gedit /usr/bin/winetricks
Run Code Online (Sandbox Code Playgroud)
并使用新计算更改值!
这个技巧也适用于 Elementary OS。但是您需要更改 gedit 并使用 scratch-text-editor。
小智 8
为了获得更好的系统外观,请在 winecfg(Wine/Configure Wine/Desktop Integration)中安装一个 windows msstyle 文件,例如“Luna”或“Royale”。
我没有评论接受的答案的声誉,所以我会在这里发表我的评论。
另一个来自 MS 服务器的官方 msstyle 文件。
刚刚安装了该.msi
文件,我能够从 Wine 配置对话框中选择“Zune 样式”。
winehq-staging
:来自https://wiki.winehq.org/Ubuntu:
如果您的系统是 64 位,请启用 32 位架构(如果尚未启用):
sudo dpkg --add-architecture i386
Run Code Online (Sandbox Code Playgroud)添加存储库:
对于 Ubuntu 18.10:
wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard/Release.key
sudo apt-key add Release.key
sudo apt-add-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard ./'
Run Code Online (Sandbox Code Playgroud)对于 18.10 之前的 Ubuntu 版本:
wget -nc https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
Run Code Online (Sandbox Code Playgroud)更新包列表:
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)然后安装:
sudo apt-get install --install-recommends winehq-staging
Run Code Online (Sandbox Code Playgroud)
如果 apt-get 抱怨缺少依赖项,请安装它们,然后重复最后两个步骤(更新和安装)。
winecfg
归档时间: |
|
查看次数: |
139498 次 |
最近记录: |