Reputation: 1122
I am working to add some fonts containing devicons to my $HOME dir for use in vim and gvim. vim needs the font in the terminal so I'm trying this command and get a xterm: unable to open font <name>, trying "fixed"
error:
xterm -u8 -fn '-misc-knack-bold-i-normal--0-0-0-0-p-0-iso8859-15'
I see that specified font in the fonts.dir file and I've refreshed my cache with fc-cache -f -v
. fc-list shows Knack:style=NerdFontPlusOcticonsPlusPomicons
but using that string yields the same result. xfontsel does NOT show this as an available font but gvim does show this font as an option.
Why does the font appear in fonts.dir (and fonts.scale) but not in xfontsel?
Why does gvim see the font but not X11?
Shell is tcsh on a Suse11 system.
Upvotes: 0
Views: 556
Reputation: 54475
This
-misc-knack-bold-i-normal--0-0-0-0-p-0-iso8859-15
is a scalable font as described in mkfontdir
, because all of the sizes are zeros. xterm
and xfd
need sizes. You can experiment with
#!/bin/sh
FONT=`xfontsel -print`
test -n "$FONT" && xfd -fn "$FONT
to see what sizes the font server would like to deliver for a non-scaled version of the font, or use the name from fc-list
with the -fa
option of xterm
and xfd
:
-fa
pattern
This option sets the pattern for fonts selected from the FreeType library if support for that library was compiled into xterm. This corresponds to thefaceName
resource. When a CJK double-width font is specified, you also need to turn on thecjkWidth
resource.
Further reading:
Upvotes: 1