MySQL 在 MySQLWorkbench 中更改字体

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9553386/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 12:21:23  来源:igfitidea点击:

Changing Font in MySQLWorkbench

mysqlconfigurationfontsmysql-workbench

提问by hjweide

I am using MySQLWorkbench 5.2, the newest version as far as I know, but I simply cannot change the font. It is very inconvenient, because the default font is very small and harsh on the eyes. The appearance tab has options for changing the font, but no change can actually be made there, as the field cannot actually be edited.

我正在使用 MySQLWorkbench 5.2,据我所知是最新版本,但我根本无法更改字体。这是非常不方便的,因为默认字体很小而且对眼睛很刺眼。外观选项卡具有更改字体的选项,但实际上无法在那里进行更改,因为实际上无法编辑该字段。

Does anyone know of a way around this? It seems to be a common bug, but I can't find a fix anywhere.

有谁知道解决这个问题的方法?这似乎是一个常见的错误,但我在任何地方都找不到修复程序。

回答by varubi

In the

在里面

Edit > Preferences... > Appearance > Fonts section

编辑 > 首选项... > 外观 > 字体部分

of the mentioned version, you canedit the font but you have to slowly double click, as its very wonky (or press enter) and then you manually have to type in the font name followed by a space and font size for example mine states:

在提到的版本中,您可以编辑字体,但必须缓慢双击,因为它非常不稳定(或按 Enter 键),然后您必须手动输入字体名称,后跟空格和字体大小,例如我的状态:

Source Sans Pro 10

Also it requires a program restart.

它还需要重新启动程序

回答by Bill LaPrise

Similarly for Mac OS X using the hidden path below (ref: this link):

同样对于 Mac OS X,使用下面的隐藏路径(参考:此链接):

"You can edit the preferences directly in their XML files. Shut down MWB. Then edit the file ~/Library/Application Support/MySQL/Workbench/wb_options.xml. Look for the key workbench.general.Editor:Font, and change the font there. Now restart MWB to see your change."

“您可以直接在其 XML 文件中编辑首选项。关闭 MWB。然后编辑文件 ~/Library/Application Support/MySQL/Workbench/wb_options.xml。查找关键 workbench.general.Editor:Font,并更改字体在那里。现在重新启动 MWB 以查看您的更改。”

回答by snowbound

Edit -> Preferences... -> Appearance -> Fonts section

编辑 -> 首选项... -> 外观 -> 字体部分

Highlight a row, click ENTER, you can then edit the font and size.

高亮一行,点击回车,即可编辑字体和大小。

Restart the app after.

之后重新启动应用程序。

回答by p_champ

Well, I just wanted to increase the size of font only because it was too small in my WB 6.1. Referred the link given by 'Kman' and did a bit different thing.

好吧,我只是想增加字体的大小,只是因为它在我的 WB 6.1 中太小了。引用'Kman'给出的链接并做了一些不同的事情。

1)Close WB

1)关闭WB

2)Go to, C:\Users\User\AppData\Roaming\MySQL\Workbench\wb_options.xml. Locate "workbench.general.Editor:Font". I got- 'Consolas 10' there and changed it to 'Consolas 13'. That increased font to a comfortable size.

2) 转到 C:\Users\User\AppData\Roaming\MySQL\Workbench\wb_options.xml。找到“workbench.general.Editor:Font”。我在那里找到了“Consolas 10”并将其更改为“Consolas 13”。将字体增加到舒适的大小。

回答by Gruber

After clean installing MySQL Workbench (WB) 5.2.47 (Windows 7) on a new machine, I wanted the Lucida Consolefont as I am used to, but for some reason WB chooses a different font for reserved keywords, making the code unreadable. There is no setting for reserved keywords. So I could not easily change this by editing the wp_options.xmlfile. The only font setting which was acceptable was Courier New.

在新机器上干净安装 MySQL Workbench (WB) 5.2.47 (Windows 7) 后,我想要Lucida Console字体,因为我习惯了,但由于某种原因,WB 为保留关键字选择了不同的字体,使代码不可读。没有保留关键字的设置。因此,我无法通过编辑wp_options.xml文件轻松更改此设置。唯一可接受的字体设置是Courier New

Then I went to another machine, and copied wp_options.xmlfrom a WB 5.2.47 which had a history of WB upgrades. That did the trick, it worked fine on the newly installed WB.

然后我去了另一台机器,wp_options.xml从一个有 WB 升级历史的 WB 5.2.47复制。这确实奏效了,它在新安装的 WB 上运行良好。

Looking at the both wp_options.xmlfiles in a text diff tool, I noted many differences, but not any that could explain the difference. My conclusion is that Oracle needs to work with UI configuration, as it is not OK that subtle, obscure edits in the wp_options.xmlfile is what is required to make the WB UI acceptable.

wp_options.xml文本差异工具中查看这两个文件,我注意到许多差异,但没有任何可以解释差异的原因。我的结论是 Oracle 需要使用 UI 配置,因为wp_options.xml文件中微妙的、晦涩的编辑是使 WB UI 可接受所需的内容。