[comp.windows.x] cant set twm/vtwm fonts

gcardwel@okazaki.acs.uci.edu (Guy Cardwell) (10/05/90)

I cant seem to get twm to let me change any of its fonts to be
something different.  In my twmrc I wrote:

TitleFont  	"12x24"

in the correct place toward the front of the file where it belongs, 
which should produce one massive font on my window titles.  However, I just
get the same dumb variable font, as defined in twm.c as 
DEFAULT_NICE_FONT.

A little work with xdbx revealed the following information:

.  the reason the fonts from my twmrc file never get set is because
   the AddToMenu function is being called by the parser long before any
   menu items are added.  (ie.. it should not be called, I think)   The
   AddToMenu is being called with really strange arguments:

	`menus`AddToMenu`item = 0x31710 "x"
	`menus`AddToMenu`action = 0x31640 ""
	*`menus`AddToMenu`menu = {
	        first     = (nil)
	        last      = (nil)
        	prev      = (nil)
	        next      = (nil)
	        name      = 0x31706 "bLoB_GoOp"
	        w         = 0
	        shadow    = 0
        	hi_fore   = 4294967295
	        hi_back   = 4294967295
	        mapped    = 0
	        height    = 0
        	width     = 0
	        items     = 0
	        pull      = 0
        	entered   = 0
	        real_menu = 0
	}

   and of course if this function gets called, then 

       if (!Scr->HaveFonts) CreateFonts();
   is executed and TWM creates its default fonts and uses them.  I redefined
DEFAULT_NICE_FONT and recompiled and the new def works... ie (its not a 
problem of twm not finding the font).

Systems:

Sun 4 running sunos 4.0.3
Sun 3 running sunos 4.0.3
Decstation 3100 running Ultrix 4.0.

Compilers:
CC and gcc both produce this behavior.


If I am totally crazy, would some one please appropriately flame me. 
Otherwise, I fix would be nice.. (I cant possibly begin to understand
the parser at the moment)

Oh.. A word of praise for the X Consortium and Tom LaStrange.... I admire
you guys for writing and debugging a window manager.   Joe User cant
possibly imagine how hard it is to debug a window manager without
a second system to run the test copy on. :)

Thanks in advance.

Guy Cardwell
gcardwel@oac.uci.edu
1-714-856-6374

dme@doc.ic.ac.uk (Dave Edmondson) (10/05/90)

In article <270BAACD.24980@orion.oac.uci.edu> gcardwel@okazaki.acs.uci.edu (Guy Cardwell) writes:
gcardwel> I cant seem to get twm to let me change any of its fonts to be
gcardwel> something different.  In my twmrc I wrote:
gcardwel> TitleFont  	"12x24"
on none of the x11r2, r3 or r4 servers that i've seen is `12x24' a
standard font, so loading the font fails and you get the default.  try
`-adobe-helvetica-medium-r-*-*-18-*-*-*-*-*-*-*'.

gcardwel> A little work with xdbx revealed the following information:
gcardwel> .....
this is interesting but not desperately relevant.  it all hangs
together in real life - believe it.

gcardwel> Guy Cardwell
dave.
--
Dave Edmondson, Systems Support.                     Opinions are all my own.
Department of Computing, Imperial College of Science, Technology and Medicine,
180 Queen's Gate, London SW7 1BZ. phone: 071-589-5111 x5085 fax: 071-581-8024
         email: dme@doc.ic.ac.uk, ..!ukc!icdoc!dme, dme@athena.mit.edu
  ``Be selective, be objective, be an asset to the collective'' -- Jazzy B