开发者

Bold xft fonts in Xresources

开发者 https://www.devze.com 2023-03-29 15:34 出处:网络
I\'ve tried to make all text in my terminal emulator bold by setting: URxvt*font: xft:FONT_NAME:pixelsize=14:style=bold

I've tried to make all text in my terminal emulator bold by setting:

URxvt*font: xft:FONT_NAME:pixelsize=14:style=bold

in a file that is read by xrdb. The problem is that this only works for certain fonts (for example: DejaVu Sans Mono, Consolas). A lot of fonts will just show up with normal weight (such as Monaco, Mensch, Andale mono).

The strange thing is that text that is supposed to be bold (like in manpages, ls output) still shows up as bold. But if I were to put

URxvt*font:     xft:Monaco:pixelsize=14
URxvt*boldFont: xft:Monaco:pixelsize=14:style=bold

then none of the text will be bold. It's as if the font has no style called "bold", even though any font selection dialog says otherwise. The fact that some of the text shows up as bold with boldFont is unspecified tells me that rxvt-unicode is capable of displayin开发者_StackOverflow中文版g bolded versions of these fonts.

I tried using these fonts in konsole and xfce4-terminal. Konsole doesn't even offer Monaco as a possible font (it doesn't think it's a monospace font, but this is a known bug), and Mensch is only available in Regular and Oblique styles. In xfce4-terminal, both Mensch and Monaco are available in Bold.

Note: I do not yet have the reputation to create new tags. The tags that have been rejected are: xrdb xresources xft urxvt


Andale Mono doesn't have bold style so specifying "style=bold" has no effect. The same goes for Monaco however I'm not sure.

Onto second part of you question. If the font you specify doesn't have a bold version, the terminal will make it itself. I don't know the exact algorithm but looks like it just prints same glyph twice with one pixel displacement. But if you specify bold font too the terminal won't attempt making bold font and all the text will look the same.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号