X11 font installation

I'm having trouble getting fonts recognised.

I've installed the base edition of the current raspbian, plus sundry extra packages including the X11 base fonts. The intent is to run headless with (realvnc's) vncserver active, and that's what I'm using to test.

Unfortunately, xterm only shows one font size available, and the vnc log shows lookup failures on the font files: Warning: Cannot convert string "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-*" to type FontStruct xterm: cannot load font "-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1" /usr/bin/xterm: cannot load font "-Misc-Fixed-medium-R-*-*-13-120-75-75-C-120-ISO10646-1" /usr/bin/xterm: cannot load font "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1" xterm: cannot load font "-misc-fixed-medium-r-normal--13-120-75-75-c-80-iso10646-1"

xlsfonts shows only a few fonts:

-misc-fixed-medium-r-semicondensed--0-0-75-75-c-0-iso8859-1

-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1 cursor fixed

yet fc-list shows a whole slew of fonts including: /usr/share/fonts/type1/gsfonts/c059013l.pfb: Century Schoolbook L:style=Roman /usr/share/fonts/type1/gsfonts/d050000l.pfb: Dingbats:style=Regular /usr/share/fonts/type1/gsfonts/n021023l.pfb: Nimbus Roman No9 L:style=Regular Italic /usr/share/fonts/type1/gsfonts/n019063l.pfb: Nimbus Sans L:style=Regular Condensed Italic /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold /usr/share/fonts/type1/gsfonts/a010013l.pfb: URW Gothic L:style=Book

I've run fontconfig as well as mkfontdir, to no avail. I confess to a certain uncertainty about how all the font stuff fits together :-}

I'm at a loss. I've obviously missed/misunderstood something fundamental, but can anyone suggest what please?

Thanks.

--
Mike Scott 
Harlow, England
Reply to
Mike Scott
Loading thread data ...

Try running fc-cache

--
Lew Pitcher 
"In Skills, We Trust"
Reply to
Lew Pitcher

....

Thanks; I think that's one of the things I tried. I've rerun it, but to no avail...

pi@raspberrypi:/usr/share/fonts/X11 $ fc-cache -v /usr/share/fonts/X11/ /usr/share/fonts/X11: skipping, existing cache is valid: 0 fonts, 5 dirs /usr/share/fonts/X11/100dpi: skipping, existing cache is valid: 358 fonts, 0 dirs /usr/share/fonts/X11/75dpi: skipping, existing cache is valid: 358 fonts, 0 dirs /usr/share/fonts/X11/encodings: skipping, existing cache is valid: 0 fonts, 1 dirs /usr/share/fonts/X11/encodings/large: skipping, existing cache is valid:

0 fonts, 0 dirs /usr/share/fonts/X11/misc: skipping, existing cache is valid: 89 fonts, 0 dirs /usr/share/fonts/X11/util: skipping, existing cache is valid: 0 fonts, 0 dirs /var/cache/fontconfig: not cleaning unwritable cache directory /home/pi/.cache/fontconfig: not cleaning non-existent cache directory /home/pi/.fontconfig: not cleaning non-existent cache directory fc-cache: succeeded

pi@raspberrypi:/usr/share/fonts/X11 $ xlsfonts

-misc-fixed-medium-r-semicondensed--0-0-75-75-c-0-iso8859-1

-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1 cursor fixed

(Very similar as root. I deleted /var/cache/fontconfig by hand, just in case, before rerunning fc-cache)

Does xterm use fontconfig? And where does mkfontdir fit in - isn't that an 'old' system?

--
Mike Scott 
Harlow, England
Reply to
Mike Scott

The -f parameter to fc-cache forces it to rescan a directory even if it seems to be valid.

When installing TrueType fonts I usually fc-cache -fv;xset fp rehash.

Reply to
Roger Bell_West

Thanks, but still no joy.

But after grubbing around a bit more on the web, I've run 'xset q', which tells me Font Path: /usr/share/vnc/fonts/

So that looks like the problem. That directory is very skeletal: # ls /usr/share/vnc/fonts/

6x13-ISO8859-1.pcf.gz cursor.pcf.gz fonts.alias fonts.dir

Crudely, I tried replacing the fonts dir with a symlink to /usr/share/fonts/X11, but the vncserver crashed most spectacularly at startup. I'm hunting for a config option to vncserver to set the fonts path to the actual X11 path -- no luck so far.

--
Mike Scott 
Harlow, England
Reply to
Mike Scott

On 15/10/2019 17:12, Mike Scott wrote: ....

And finally there... the common.custom config file doesn't seem to work, but adding

xset +fp "/usr/share/fonts/X11/75dpi,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/misc"

to the xstartup file does the job.

Thanks for the comments.

--
Mike Scott 
Harlow, England
Reply to
Mike Scott

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.