Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!orion.oac.uci.edu!okazaki.acs.uci.edu!gcardwel From: gcardwel@okazaki.acs.uci.edu (Guy Cardwell) Newsgroups: comp.windows.x Subject: cant set twm/vtwm fonts Message-ID: <270BAACD.24980@orion.oac.uci.edu> Date: 4 Oct 90 21:34:05 GMT Reply-To: Guy Cardwell Organization: University of California, Irvine Lines: 70 Nntp-Posting-Host: okazaki.acs.uci.edu 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