我想urxvt加载DejaVu Sans Mono for Powerline
字体,但无论如何都无法使用xft
。
摘录自~/.Xresources
from my dotfiles
! this work
! URxvt.font: -*-dejavu sans mono-medium-r-*-*-0-*-*-*-*-*-koi8-u
! none of these - dont
! URxvt.font: xft:DejaVu Sans Mono for Powerline:style=Book:size=12
! URxvt*font: xft:DejaVu Sans Mono for Powerline:style=Book:size=12
! URxvt*font: xft:DejaVu Sans Mono for Powerline:size=12
! URxvt*font: xft:DejaVu Sans Mono:size=12
我使用了来自aur的rxvt-unicode-patched版本
让我们检查是否正确
$ urxvt --help 2>&1 | grep options
options: perl,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr+zh+zh-ext,fade,transparent,tint,pixbuf,XIM,frills,selectionscrolling,wheel,slipwheel,smart-resize,cursorBlink,pointerBlank,scrollbars=plain+rxvt+NeXT+xterm
$ fc-match "DejaVu Sans Mono for Powerline"
DejaVu Sans Mono for Powerline.ttf: "DejaVu Sans Mono for Powerline" "Book"
$ fc-list G "DejaVu Sans Mono"
/usr/share/fonts/TTF/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book
/usr/share/fonts/TTF/DejaVu Sans Mono Bold for Powerline.ttf: DejaVu Sans Mono for Powerline:style=Bold
/usr/share/fonts/TTF/DejaVuSansMono-Oblique.ttf: DejaVu Sans Mono:style=Oblique
/usr/share/fonts/TTF/DejaVu Sans Mono Oblique for Powerline.ttf: DejaVu Sans Mono for Powerline:style=Oblique
/usr/share/fonts/TTF/DejaVu Sans Mono for Powerline.ttf: DejaVu Sans Mono for Powerline:style=Book
/usr/share/fonts/TTF/DejaVu Sans Mono Bold Oblique for Powerline.ttf: DejaVu Sans Mono for Powerline:style=Bold Oblique
/usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold
/usr/share/fonts/TTF/DejaVuSansMono-BoldOblique.ttf: DejaVu Sans Mono:style=Bold Oblique
$ xset q
Keyboard Control:
auto repeat: on key click percent: 0 LED mask: 00000000
XKB indicators:
00: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off
03: Compose: off 04: Kana: off 05: Sleep: off
06: Suspend: off 07: Mute: off 08: Misc: off
09: Mail: off 10: Charging: off 11: Shift Lock: off
12: Group 2: off 13: Mouse Keys: off
auto repeat delay: 660 repeat rate: 25
auto repeating keys: 00fdffffdffffbbf
fedfffefffedffff
9fffffffffffffff
fff7ffffffffffff
bell percent: 50 bell pitch: 400 bell duration: 100
Pointer Control:
acceleration: 2/1 threshold: 4
Screen Saver:
prefer blanking: yes allow exposures: yes
timeout: 0 cycle: 600
Colors:
default colormap: 0x22 BlackPixel: 0x0 WhitePixel: 0xffffff
Font Path:
/usr/share/fonts/misc/,/usr/share/fonts/TTF/,/usr/share/fonts/OTF/,/usr/share/fonts/Type1/,built-ins
DPMS (Energy Star):
Standby: 600 Suspend: 600 Off: 600
DPMS is Disabled
/etc/fonts/conf.d $ ll
total 8
lrwxrwxrwx 1 root root 44 Jan 10 11:07 10-hinting-slight.conf -> /etc/fonts/conf.avail/10-hinting-slight.conf
lrwxrwxrwx 1 root root 48 Jan 10 11:07 10-scale-bitmap-fonts.conf -> /etc/fonts/conf.avail/10-scale-bitmap-fonts.conf
lrwxrwxrwx 1 root root 43 Jan 13 22:10 10-sub-pixel-rgb.conf -> /etc/fonts/conf.avail/10-sub-pixel-rgb.conf
lrwxrwxrwx 1 root root 47 Jan 13 22:10 11-lcdfilter-default.conf -> /etc/fonts/conf.avail/11-lcdfilter-default.conf
lrwxrwxrwx 1 root root 46 Oct 31 11:34 20-unhint-small-dejavu-sans.conf -> ../conf.avail/20-unhint-small-dejavu-sans.conf
lrwxrwxrwx 1 root root 51 Oct 31 11:34 20-unhint-small-dejavu-sans-mono.conf -> ../conf.avail/20-unhint-small-dejavu-sans-mono.conf
lrwxrwxrwx 1 root root 47 Oct 31 11:34 20-unhint-small-dejavu-serif.conf -> ../conf.avail/20-unhint-small-dejavu-serif.conf
lrwxrwxrwx 1 root root 47 Jan 10 11:07 20-unhint-small-vera.conf -> /etc/fonts/conf.avail/20-unhint-small-vera.conf
lrwxrwxrwx 1 root root 44 Jan 10 11:07 30-metric-aliases.conf -> /etc/fonts/conf.avail/30-metric-aliases.conf
lrwxrwxrwx 1 root root 41 Jan 10 11:07 30-urw-aliases.conf -> /etc/fonts/conf.avail/30-urw-aliases.conf
lrwxrwxrwx 1 root root 31 Jan 12 20:08 31-cantarell.conf -> ../conf.avail/31-cantarell.conf
lrwxrwxrwx 1 root root 38 Jan 10 11:07 40-nonlatin.conf -> /etc/fonts/conf.avail/40-nonlatin.conf
lrwxrwxrwx 1 root root 40 Jun 16 2015 44-source-han-sans-kr.conf -> ../conf.avail/44-source-han-sans-kr.conf
lrwxrwxrwx 1 root root 35 Jan 10 11:07 45-latin.conf -> /etc/fonts/conf.avail/45-latin.conf
lrwxrwxrwx 1 root root 39 Jan 10 11:07 49-sansserif.conf -> /etc/fonts/conf.avail/49-sansserif.conf
lrwxrwxrwx 1 root root 34 Jan 10 11:07 50-user.conf -> /etc/fonts/conf.avail/50-user.conf
lrwxrwxrwx 1 root root 35 Jan 10 11:07 51-local.conf -> /etc/fonts/conf.avail/51-local.conf
lrwxrwxrwx 1 root root 33 Oct 31 11:34 57-dejavu-sans.conf -> ../conf.avail/57-dejavu-sans.conf
lrwxrwxrwx 1 root root 38 Oct 31 11:34 57-dejavu-sans-mono.conf -> ../conf.avail/57-dejavu-sans-mono.conf
lrwxrwxrwx 1 root root 34 Oct 31 11:34 57-dejavu-serif.conf -> ../conf.avail/57-dejavu-serif.conf
lrwxrwxrwx 1 root root 35 Jan 10 11:07 60-latin.conf -> /etc/fonts/conf.avail/60-latin.conf
lrwxrwxrwx 1 root root 43 Jan 10 11:07 65-fonts-persian.conf -> /etc/fonts/conf.avail/65-fonts-persian.conf
lrwxrwxrwx 1 root root 38 Jan 10 11:07 65-nonlatin.conf -> /etc/fonts/conf.avail/65-nonlatin.conf
lrwxrwxrwx 1 root root 37 Jan 10 11:07 69-unifont.conf -> /etc/fonts/conf.avail/69-unifont.conf
lrwxrwxrwx 1 root root 39 Jan 10 11:07 80-delicious.conf -> /etc/fonts/conf.avail/80-delicious.conf
-rw-r--r-- 1 root root 1565 Jan 12 22:26 81-ubuntu.conf
lrwxrwxrwx 1 root root 39 Jan 10 11:07 90-synthetic.conf -> /etc/fonts/conf.avail/90-synthetic.conf
-rw-r--r-- 1 root root 978 Jan 10 11:07 README
我得到了什么
$ xrdb -merge -I$HOME ~/.Xresources && urxvt
urxvt: unable to load base fontset, please specify a valid one using -fn, aborting.
那时 xrdb -query -all
here
为什么?!
答案 0 :(得分:1)
而不是大小,你应该使用 pixelsize :
URxvt.font: xft:DejaVu Sans Mono for Powerline:style=Book:pixelsize=12