Well my re-write and tidy up of astime is progressing.
I'm happy with my 'one line per parameter' initialisation code, much less sprawling than the original.
I'm now onto the bits I actually want to change, the original version has (horrible) bit-mapped fonts for AM/PM, day of week, etc. These are actually included in the program distribution as *.xpm files which are built into the code. Thus there is no choice of font and if you happened to want to change the names for the days of the week you have to recode the bit maps character by character. Not to mention the horrible convolutions required to actually select the right digits given the date!
astime already has the ability to display some text (called a 'label') on the clock and you *can* specify the font for this. If you simply set the label to today's date and tell it to display you get a much nicer display of the date than the built in one. It also saves several hundred lines of code! It was playing with this facility that prompted me to start changing the code so that the date, day of week, AM/PM etc. are all done more elegantly.
So (as before) finally to the question.
I can see how to select specific fonts in X but is there any way to find a default font family? I.e. I want the code to be fairly general and work in a passable fashion on any X system, thus specifying a font in the code is risky, there's no font guaranteed to be on all systems. What I want is a way to find a font which is (probably) the default for the window manager in use for example.
Going on from that is there an easy way to find the range of sizes available for a given font? Then I can find a default (or at least definitely available) font and select a size which is a reasonable match to the clock size.
I suppose I could wait until I get home and look this up, I have a set of X programming manuals, but if anyone here can help that would be useful.