Warning: Cannot convert string

I just wanted to run little old xcalc on Cygwin.

$ xcalc
Warning: Cannot convert string "calculator" to type Pixmap
Warning: Cannot convert string "8x13" to type FontStruct
Warning: Cannot convert string "-adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*" to type FontStruct

Now, I had done a rather minimal installation of Cygwin, so this was not entirely a shock. First — where is the pixmap?

https://bkhome.org/news/201711/xcalc-crash-fixed.html

OK, let’s install xbitmaps and try again …

$ xcalc 
Warning: Cannot convert string "8x13" to type FontStruct 
Warning: Cannot convert string "-adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*" to type FontStruct

OK, that error is gone.

Check if xorg-x11-fonts-misc is installed — no, it is not.

OK, go install that… OK, better:

$ xcalc 
Warning: Cannot convert string "-adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*" to type FontStruct

adobe-symbol is in the xorg-x11-fonts-misc package according to Cygwin package search, so maybe it’s looking in the wrong place? Or this is not the right font for something as old as xcalc?

Try installing xlsfonts and checking:

$ xlsfonts | grep adobe | grep symb
-urw-standard symbols l-medium-r-normal--0-0-0-0-p-0-adobe-symbol

$ xlsfonts -fn "-adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*"
xlsfonts: pattern "-adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*" unmatched

A couple of the symbols on the xcalc interface are not rendering (root sign and pi); try installing xorg-x11-fonts-dpi100 and dpi75 and … problem fixed!

$ xlsfonts -fn "-adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*"
-adobe-symbol-medium-r-normal--12-120-75-75-p-74-adobe-fontspecific
-adobe-symbol-medium-r-normal--17-120-100-100-p-95-adobe-fontspecific

Ok, so the issue is that Cygwin dependency resolution seems to make sure the binary can run, but may not always check that all the needed resources are on hand. I’m ok with that. A combination of a little googling and the Cygwin package search website gets us there.Xcalc screen shot -- just how I like it -- black and white and old fashioned

This is all the result of intentionally starting with a very minimal installation, but if xcalc cannot run flawlessly, then maybe it’s too minimal…

Now ‘old’ X11 programs (xcalc, xdvi, xpdf, gv, xfontsel and xfig) all work without throwing any errors. Good.

Author: Darren

I'm a scientist by training, currently working as a writer, trainer and editor.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.