old-www/HOWTO/Bash-Prompt-HOWTO/x606.html

223 lines
3.6 KiB
HTML

<HTML
><HEAD
><TITLE
>Changing the Xterm Font</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Bash Prompt HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="The Bash Prompt Package"
HREF="the-bash-prompt-package.html"><LINK
REL="PREVIOUS"
TITLE="Xterm Fonts"
HREF="x598.html"><LINK
REL="NEXT"
TITLE="Line Draw Characters without VGA Fonts"
HREF="x622.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Bash Prompt HOWTO: </TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x598.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 8. The Bash Prompt Package</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x622.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN606"
></A
>8.3. Changing the Xterm Font</H1
><P
>Getting and installing these fonts is a somewhat involved process. First,
retrieve the font(s). Next, ensure they're .pcf or .pcf.gz files. If
they're .bdf files, investigate the "bdftopcf" command (ie. read the man
page). Drop the .pcf or .pcf.gz files into the
<TT
CLASS="FILENAME"
>/usr/X11R6/lib/X11/fonts/misc</TT
>
dir (this is the correct directory for RedHat
5.1 through 7.1, it may be different on other distributions).
<B
CLASS="COMMAND"
>cd</B
> to that directory, and run <B
CLASS="COMMAND"
>mkfontdir</B
>.
Then run <B
CLASS="COMMAND"
>xset fp rehash</B
> and/or restart your X font
server, whichever
applies to your situation. Sometimes it's a good idea to go into the
<TT
CLASS="FILENAME"
>fonts.alias</TT
> file in the same directory, and
create shorter alias names for the fonts.</P
><P
>To use the new fonts, you start your Xterm program of choice with the
appropriate command to your Xterm, which can be found either in the man
page or by using the "--help" parameter on the command line. Popular terms
would be used as follows:</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>xterm -font &#60;fontname&#62;</PRE
></FONT
></TD
></TR
></TABLE
><P
><EM
>OR</EM
> </P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>xterm -fn &#60;fontname&#62; -fb &#60;fontname-bold&#62;
Eterm -F &#60;fontname&#62;
rxvt -fn &#60;fontname&#62;</PRE
></FONT
></TD
></TR
></TABLE
><P
>VGA fonts are available from <EM
>Stumpy's ANSI Fonts</EM
>
page at <A
HREF="http://home.earthlink.net/~us5zahns/enl/ansifont.html"
TARGET="_top"
>http://home.earthlink.net/~us5zahns/enl/ansifont.html</A
> (which I have
borrowed from extensively while writing this).</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x598.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x622.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Xterm Fonts</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="the-bash-prompt-package.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Line Draw Characters without VGA Fonts</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>