我正在尝试使 Emacs 中的字体更大胆一些。我使用 Inconsolata,这是我的 .emacs
中的一个片段:
(when window-system
(set-face-attribute 'default
nil
:font "Inconsolata"
:height 120
:weight 'bold) ; <- this line does not affect rendering
(require 'color-theme-solarized)
(color-theme-solarized-dark)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_FULLSCREEN" 0)))
我知道 Inconsolata 可以被渲染为粗体,但出于某种原因,Emacs 总是以正常的权重来渲染它。也许我应该在尝试更改字体之前启用某些功能?
最佳答案
不幸的是,原始 Inconsolata 没有粗体变体,应用程序通过增加字符宽度来模拟 Inconsolata Bold。这就是为什么可以在其中一些中使用 Inconsolata 的“粗体”变体。
根据 this Wikipedia article :
when Inconsolata was added to Google Fonts, it was fully hinted and a bold variant was added
因此,使用哪个版本的字体很重要。我已经删除了原来的 Inconsolata 并以这种方式安装了 Google 字体(Arch Linux):
# yaourt -S ttf-google-fonts-git
如果您遇到此类问题,请尝试为您的 Linux 发行版搜索类似的软件包。
关于emacs - 粗体属性不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25542061/