fixed-width printf() output on an XmList on Solaris

This one is a bit of bugger and I'm not sure if it's entirely relevant to this board but here goes...

I'm trying to produce some fixed width output to a List widget (X11/Motif GUI) So, I use something similar to:

sprintf(Buffer, "%*d%*f", 20, some_integer, 20, some_float);

This gives me a nice fixed-width string, which I then have to convert to an XmString and then add that to the List widget.

My problem is, after adding multiple lines, the columns are not aligned. On some machines they are (for instance if I remote shell from a Windows box using ReflectX), but on the host the output does not align.

Most of my widgets use the system default font, through which in Motif (as I understand it) you specify by using XmFONTLIST_DEFAULT_TAG in most of your XmString updates. I have a feeling that the font the host uses is not fixed-width - but I wouldn't have a clue where to change the font or what font it is using. Is it quite possible for X to use non fixed-width fonts?

Perhaps this is better targeted to a Motif forum, but thought it was worth a shot....

Thx in advance :slight_smile: