[comp.windows.x] X11R4 xterm font trick

dce@smsc.sony.com (David Elliott) (07/10/90)

Here's something that may not be as common knowledge as it should be.

In X11R4, Ctrl-Button3 (that is, control-right-mouse-button) will pop
up a menu that allows you to change to a tiny font (so small that you
can't read the text, but you know it's there -- like the X10 xterm
icon), a small font (readable, but not for too long), a medium font
(good enough for when you need tiling), and a large font.

You can also choose the default font (the one that xterm was started
with), and if you have a selection, you can use that as the font name.
This last one is great for viewing fonts for potential use in xterm.
You do an xlsfonts in one window, select the name from that window,
and use it to change the font in another window (I usually put up
a man page or source text in the window).

People around here have made a lot of use out of this new menu item,
and I hope that this note is not old news to everyone reading this
group.
-- 
David Elliott
dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce
(408)944-4073
"You know my motto: Forgive and uh... the other thing."

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (07/10/90)

    You do an xlsfonts in one window, select the name from that window,

You might find xfontsel more useful for browsing.  You can use the select
button to enable the selection for use by xterm.

keane@ultima.cs.uts.oz (Chris Keane) (07/13/90)

dce@smsc.sony.com (David Elliott) writes:

>Here's something that may not be as common knowledge as it should be.

>up a menu that allows you to change to a tiny font (so small that you
>can't read the text, but you know it's there -- like the X10 xterm
>icon), a small font (readable, but not for too long), a medium font
>(good enough for when you need tiling), and a large font.

Ah, but how to I change these default fonts to what *I* want? I tried
setting (what I think) are the appropriate resources, but no go :-(

Suggestions anyone?

regards...
                                            Chris.
+-------------------------------------------------+
| The ultimate profit-making juke-box: It plays   |  keane@ultima.cs.uts.oz.au
| Kylie Minogue songs until you put money in it...| 
+-------------------------------------------------+
Disclaimer: These are my own opinions, but I'm insane. What's your excuse?

bob@MorningStar.Com (Bob Sutterfield) (07/13/90)

In article <18030@ultima.cs.uts.oz> keane@ultima.cs.uts.oz (Chris Keane) writes:
   Ah, but how to I change these default fonts to what *I* want? I
   tried setting (what I think) are the appropriate resources, but no
   go :-(

I'm sure it could be specified in a prettier way, but this works fine
for me:

XTerm*fontMenu.Label:  VT Fonts
XTerm*fontMenu*fontdefault*Label:	Default
Xterm*fontMenu*fontdefault:		9x15
XTerm*fontMenu*font1*Label:	Tiny
XTerm*VT100*font1:		nil2
XTerm*fontMenu*font2*Label:	12 Point
XTerm*VT100*font2:		-*-lucidatypewriter-medium-*-*-*-*-120-*-*-*-*-*-*
XTerm*fontMenu*font3*Label:	14 Point
XTerm*VT100*font3:		-*-lucidatypewriter-medium-*-*-*-*-140-*-*-*-*-*-*
XTerm*fontMenu*font4*Label:	18 Point
XTerm*VT100*font4:		-*-lucidatypewriter-medium-*-*-*-*-180-*-*-*-*-*-*
XTerm*fontMenu*fontescape*Label:	Escape Sequence
XTerm*fontMenu*fontsel*Label:		Selection
XTerm*font:			-*-lucidatypewriter-medium-*-*-*-*-120-*-*-*-*-*-*

(and now for the odd part:)

XTerm*allowSendEvents:		true
XTerm*VT100.Translations:	#override \n\
	<Key>F1: 	set-vt-font(1) set-scrollbar(toggle) \n\
	<Key>F2:	set-vt-font(2) set-scrollbar(toggle) \n\
	<Key>F3:	set-vt-font(3) set-scrollbar(toggle) \n\
	<Key>F4:	set-vt-font(4) set-scrollbar(toggle) \n\
	<Key>F5:	set-scrollbar(toggle) \n\
	<Key>L7:	set-vt-font(1) set-scrollbar(toggle) keymap(unicon)

XTerm*VT100.uniconKeymap.Translations: #override \n\
	<Key>L7:	set-scrollbar(toggle) set-vt-font(2) keymap(None)

My window manager (gwm) can send key events upon request, so when I
hit a box in left end of the title stripe, the xterm window uses the
tiny font and loses its scrollbar.  It looks and feels just like the
"active icons" of yore.

dce@smsc.sony.com (David Elliott) (07/13/90)

In article <18030@ultima.cs.uts.oz>, keane@ultima.cs.uts.oz (Chris
Keane) writes:
|> 
|> Ah, but how to I change these default fonts to what *I* want? I tried
|> setting (what I think) are the appropriate resources, but no go :-(

Take a look at the app-defaults file for xterm.  You'll see the following
section:

XTerm*fontMenu.Label:  VT Fonts
XTerm*fontMenu*fontdefault*Label:       Default
XTerm*fontMenu*font1*Label:     Tiny
XTerm*VT100*font1:              nil2
XTerm*fontMenu*font2*Label:     Small
XTerm*VT100*font2:              6x10
XTerm*fontMenu*font3*Label:     Medium
XTerm*VT100*font3:              8x13
XTerm*fontMenu*font4*Label:     Large
XTerm*VT100*font4:              9x15
XTerm*fontMenu*fontescape*Label:        Escape Sequence
XTerm*fontMenu*fontsel*Label:           Selection

This worked for me (I now have a really large "Large" font).

I noticed that setting XTerm*font1 didn't work, and I suspect
that it's because this specification is too loose to work (that
is, it matches resources with different types).

...David Elliott
...dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce
...(408)944-4073
..."You know my motto: Forgive and uh... the other thing."