Ubuntu – How to configure X11 to find a font as requested by a proprietary binary

fonts

Starting a proprietary binary I get the following error message:

FATAL ERROR from X-windows: font not found: -*-*helvetica-bold-r-normal-*-11-*-*-*-*-*-*-*

I'm not quite experienced in handling with fonts, but as far as I understand that string -*-*helvetica-bold-r-normal-*-11-*-*-*-*-*-*-* should match a helvetica font, bold, in size 11, which should be quite a normal font.

After googling I tried the following things without result:

$ sudo xlsfonts -fn -*-*helvetica-bold-r-normal-*-11-*-*-*-*-*-*-*
xlsfonts: pattern "-*-*helvetica-bold-r-normal-*-11-*-*-*-*-*-*-*" unmatched
# in case the `*` is a problem:
$ sudo xlsfonts -fn -*-helvetica-bold-r-normal-*-11-*-*-*-*-*-*-*
xlsfonts: pattern "-*-helvetica-bold-r-normal-*-11-*-*-*-*-*-*-*" unmatched

also

$ sudo mkfontdir
$ sudo xset fp rehash

didn't help.

How can I find the problem? And how to solve it?

Best Answer

I couldn't find a better solution then changing the strings in a fonts.dir file to match the strings.

Assuming that the normal Courier font should be at least readable if used incorrectly, I copied all the files from the vanilla Type1 folder into a local font folder and also the lines from the Type1/fonts.dir which contained the name courier. Then I added at the end of the names string just helvetica and rehashed the font cache. Then the program could start without an error.

$ cp /usr/share/fonts/X11/Type1/c0* ~/fonthack/
$ cp /usr/share/fonts/X11/Type1/fonts.dir ~/fonthack/
$ vim ~/fonthack/fonts.dir
# editing the lines. e.g.:
# from: c0419bt_.pfb -bitstream-courier 10 pitch-medium-r-normal-0-0-0-0-m-0-adobe-standard
# to: c0419bt_.pfb -bitstream-courier 10 pitchhelvetica-medium-r-normal-0-0-0-0-m-0-adobe-standard
# removed all lines without ``courier'' in their names
$ xset fp rehash
$ ~/the_tool_i_want_to_use
Related Question