[102553] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: how to increase the font size in X window?B

daemon@ATHENA.MIT.EDU (Cameron Simpson)
Thu Dec 3 19:46:39 1998

Date: 4 Dec 1998 00:26:54 -0000
X-Original-To: redhat-list@redhat.com
From: Cameron Simpson <cs@zip.com.au>
Reply-to: cs@zip.com.au
To: redhat-list@redhat.com
Cc: tressens@etud.insa-tlse.fr
Resent-From: redhat-list@redhat.com

On 3 Dec 1998, in message <Pine.A32.3.91.981203122810.20168A-100000@compute.it.siu.edu>
  Zaigui Wang <zgwang@compute.it.siu.edu> wrote:
| I find it difficult to use Vi in x window due to the font size. How can I 
| change the font size to something bigger?

You have to arrange that the xterm holding the vi has a bigger font.
You can do this for a specific xterm by saying:

	xterm -fn 8x16 &

which gets you an 8x16 pixel font. Only certain WxH combitations exist; for
finer tuning run:

	xfontsel

and pick a pxlsz (pixel size) or ptSz (point size) which suits you.
Taking a pixel size of 16, the font name becomes:

	-*-*-*-*-*-*-16-*-*-*-*-*-*-*

This is a pattern - you can further constrain things, for example you might
set the slant to r (regular) and the rgstry (registry) to iso8859, since
you're in France and will want a better charset than plain ASCII:

	-*-*-*-r-*-*-16-*-*-*-*-*-iso8859-*

So, you'd invoke the xterm as:

	xterm -fn '-*-*-*-r-*-*-16-*-*-*-*-*-iso8859-*' &

We need those quotes because * is a shell pattern matching character, and
we don't want that to happen to our font string.

To do this for all vi sessions, you may want to make a little script
(don't call it "vi"!) for editing. I use one called "e", myself.
It might contain, perhaps:

	#!/bin/sh
	xterm -fn '-*-*-*-r-*-*-16-*-*-*-*-*-iso8859-*' -e vi ${1+"$@"} &

Then take to saying "e file" instead of "vi file".

Now to make it stick for all xterms instead of just editors you have to amend
you X defaults to have:

	XTerm*VT100*fontName: -*-*-*-r-*-*-16-*-*-*-*-*-iso8859-*

in them. Go see:

	http://www.zip.com.au/~cs/answers/x11-cut-paste.txt

which was actually written about hacking cut/paste in an xterm, but the
portion talking about defaults applies to your font issue as well.
--
Cameron Simpson, DoD#743        cs@zip.com.au        http://www.zip.com.au/~cs/

Perhaps this morning there were only three Euclidean solids, but god changed
its mind retroactively at lunchtime, remaking the whole history of the
universe.  That's the way it is with omnipotent beings.
	- mikel@Apple.COM (Mikel Evins)


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post