0

I'm trying to use an old binary (HP VEX simulator: http://www.hpl.hp.com/downloads/vex) which uses VCG visualization tool (http://www.rw.cdl.uni-saarland.de/~sander/html/gsvcg1.html) on Ubuntu 16.04.4 LTS.

I cannot produce any graphical output because of the function call XLoadQueryFont returns false when trying to load courier font. Here are some snippets from the source code:

#define VCG_DEFAULT_FONT "-*-courier-*-*-*--14-*-*-*-*-*-*-*"
char Xfontname[512] = VCG_DEFAULT_FONT;
panel_font = XLoadQueryFont(root_display,Xfontname);
if (!panel_font)
Fatal_error("Font not found.","");

I tried adding the courier font to my X11 fonts to solve this issue but I can't manage to figure it out. I got courier regular from http://fontsgeek.com/fonts/Courier-Regular/download and add it to ~/.fonts but that didn't solve the issue.

I tried following http://vietunicode.sourceforge.net/howto/fontlinux.html and https://wiki.ubuntu.com/Fonts but it still doesn't work.

Also it's interesting that running xlsfonts returns a courier font but with size 10, not 14, which probably doesn't match the one in the source code.

# xlsfonts | grep courier
-bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-adobe-standard
-bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-ascii-0
-bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-iso10646-1
-bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-iso8859-1
-bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-adobe-standard
-bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-ascii-0
-bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-iso10646-1
-bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-iso8859-1
-bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-adobe-standard
-bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-ascii-0
-bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-iso10646-1
-bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-iso8859-1
-bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-adobe-standard
-bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-ascii-0
-bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-iso10646-1
-bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-iso8859-1

Any idea what would be the right way to add "-*-courier-*-*-*--14-*-*-*-*-*-*-*" font to X11 so that it will be detected by XLoadQueryFont?

Thanks!

0

The right way would be to install the xfonts-75dpi package, which has the pattern that you're looking for, e.g.,

-adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
-adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
-adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1
-adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1
-adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
-adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
-adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1
-adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1

That automatically updates the font-directory:

sudo apt-get install xfonts-75dpi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.