doc-src/System/fonts.tex
author wenzelm
Tue, 11 Dec 2001 15:03:57 +0100
changeset 12462 f540925258fb
parent 11616 ee1247ba4941
permissions -rw-r--r--
removed unused stuff;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3695
diff changeset
     1
4555
wenzelm
parents: 4540
diff changeset
     2
%$Id$
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
     3
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
     4
\chapter{Fonts and character encodings}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
     5
7882
wenzelm
parents: 7849
diff changeset
     6
Using the print mode mechanism of Isabelle, variant forms of output become
12462
f540925258fb removed unused stuff;
wenzelm
parents: 11616
diff changeset
     7
quite easy. As the canonical application of this feature, Pure and major
f540925258fb removed unused stuff;
wenzelm
parents: 11616
diff changeset
     8
object-logics (FOL, ZF, HOL, HOLCF) support input and output of proper
f540925258fb removed unused stuff;
wenzelm
parents: 11616
diff changeset
     9
mathematical symbols as built-in option.  From the perspective of the raw
f540925258fb removed unused stuff;
wenzelm
parents: 11616
diff changeset
    10
Isabelle process, symbolic output is enabled by activating the
f540925258fb removed unused stuff;
wenzelm
parents: 11616
diff changeset
    11
``\ttindex{xsymbols}'' print mode.  Major user-interfaces like Proof~General
f540925258fb removed unused stuff;
wenzelm
parents: 11616
diff changeset
    12
\cite{proofgeneral} with the X-Symbol package \cite{x-symbol} already provide
f540925258fb removed unused stuff;
wenzelm
parents: 11616
diff changeset
    13
reasonable provisions to make this work out well in practice.  Thus end-users
f540925258fb removed unused stuff;
wenzelm
parents: 11616
diff changeset
    14
rarely need to interact with such issues themselves.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    15
7882
wenzelm
parents: 7849
diff changeset
    16
\medskip Displaying non-standard characters requires special screen fonts. The
wenzelm
parents: 7849
diff changeset
    17
\texttt{installfonts} utility takes care of this (see
12462
f540925258fb removed unused stuff;
wenzelm
parents: 11616
diff changeset
    18
\S\ref{sec:tool-installfonts}).
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    19
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    20
3262
7115da553895 under construction;
wenzelm
parents: 3217
diff changeset
    21
\section{Telling X11 about the Isabelle fonts --- \texttt{isatool installfonts}}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    22
\label{sec:tool-installfonts}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    23
7882
wenzelm
parents: 7849
diff changeset
    24
The \tooldx{installfonts} utility ensures that your currently running X11
wenzelm
parents: 7849
diff changeset
    25
display server (as determined by the \texttt{DISPLAY} environment variable)
wenzelm
parents: 7849
diff changeset
    26
knows about the Isabelle fonts. Its usage is:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    27
\begin{ttbox}
9984
09fc8fc746c4 isatool installfonts: -x option;
wenzelm
parents: 9695
diff changeset
    28
Usage: installfonts [OPTIONS]
09fc8fc746c4 isatool installfonts: -x option;
wenzelm
parents: 9695
diff changeset
    29
09fc8fc746c4 isatool installfonts: -x option;
wenzelm
parents: 9695
diff changeset
    30
  Options are:
09fc8fc746c4 isatool installfonts: -x option;
wenzelm
parents: 9695
diff changeset
    31
    -x           install X-Symbol fonts
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    32
9984
09fc8fc746c4 isatool installfonts: -x option;
wenzelm
parents: 9695
diff changeset
    33
  Installs symbol fonts on the current X11 server.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    34
\end{ttbox}
9984
09fc8fc746c4 isatool installfonts: -x option;
wenzelm
parents: 9695
diff changeset
    35
09fc8fc746c4 isatool installfonts: -x option;
wenzelm
parents: 9695
diff changeset
    36
The \texttt{-x} option installs fonts for the X-Symbol package
09fc8fc746c4 isatool installfonts: -x option;
wenzelm
parents: 9695
diff changeset
    37
\cite{x-symbol}, rather than the basic Isabelle ones.
09fc8fc746c4 isatool installfonts: -x option;
wenzelm
parents: 9695
diff changeset
    38
7882
wenzelm
parents: 7849
diff changeset
    39
Note that this need not be called manually under normal circumstances --- user
wenzelm
parents: 7849
diff changeset
    40
interfaces depending on the Isabelle fonts usually invoke
3262
7115da553895 under construction;
wenzelm
parents: 3217
diff changeset
    41
\texttt{installfonts} automatically.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    42
7882
wenzelm
parents: 7849
diff changeset
    43
\medskip As simple as this might appear to be, it is not! X11 fonts are a
wenzelm
parents: 7849
diff changeset
    44
surprisingly complicated matter. Depending on your network structure, fonts
wenzelm
parents: 7849
diff changeset
    45
might have to be installed differently. This has to be specified via the
9984
09fc8fc746c4 isatool installfonts: -x option;
wenzelm
parents: 9695
diff changeset
    46
\settdx{ISABELLE_INSTALLFONTS} (or \settdx{XSYMBOL_INSTALLFONTS}) variables in
09fc8fc746c4 isatool installfonts: -x option;
wenzelm
parents: 9695
diff changeset
    47
your local settings.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    48
7882
wenzelm
parents: 7849
diff changeset
    49
\medskip In the simplest situation, X11 is used only locally, i.e.\ the client
wenzelm
parents: 7849
diff changeset
    50
program (Isabelle) and the display server are run on the same machine. In that
wenzelm
parents: 7849
diff changeset
    51
case, most X11 display servers should be happy by being told about the
wenzelm
parents: 7849
diff changeset
    52
Isabelle fonts directory as follows:
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    53
\begin{ttbox}
11616
wenzelm
parents: 10862
diff changeset
    54
ISABELLE_INSTALLFONTS="xset fp+ $ISABELLE_HOME/lib/fonts; xset fp rehash"
wenzelm
parents: 10862
diff changeset
    55
\end{ttbox}%$
7882
wenzelm
parents: 7849
diff changeset
    56
The same also works for remote X11 sessions in a largely homogeneous network,
wenzelm
parents: 7849
diff changeset
    57
where any X11 display machine also mounts the Isabelle distribution under the
wenzelm
parents: 7849
diff changeset
    58
\emph{same} name as the client side.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    59
7882
wenzelm
parents: 7849
diff changeset
    60
\medskip Above method fails, though, if the display machine does have the font
wenzelm
parents: 7849
diff changeset
    61
files at the same location as the client. In case your server is a full
wenzelm
parents: 7849
diff changeset
    62
workstation with its own file system, you could in principle just copy the
wenzelm
parents: 7849
diff changeset
    63
fonts there and do an appropriate \texttt{xset~fp+} manually before running
wenzelm
parents: 7849
diff changeset
    64
the Isabelle interface. This is very awkward, of course. It is even impossible
wenzelm
parents: 7849
diff changeset
    65
for proper X11 terminals that do not have their own file system.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    66
7882
wenzelm
parents: 7849
diff changeset
    67
A much better solution is to have a \emph{font server} offer the Isabelle
wenzelm
parents: 7849
diff changeset
    68
fonts to any X11 display on the network.  There are already suitable servers
wenzelm
parents: 7849
diff changeset
    69
running at Munich and Cambridge. So in case you have a permanent Internet
wenzelm
parents: 7849
diff changeset
    70
connection to either site, you may just attach yourself as follows:
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    71
\begin{ttbox}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    72
ISABELLE_INSTALLFONTS="xset fp+ tcp/isafonts.informatik.tu-muenchen.de:7200"
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    73
\end{ttbox}
3695
6967a42a8496 added Cambridge fs;
wenzelm
parents: 3278
diff changeset
    74
or
6967a42a8496 added Cambridge fs;
wenzelm
parents: 3278
diff changeset
    75
\begin{ttbox}
6967a42a8496 added Cambridge fs;
wenzelm
parents: 3278
diff changeset
    76
ISABELLE_INSTALLFONTS="xset fp+ tcp/font-serv.cl.cam.ac.uk:7100"
6967a42a8496 added Cambridge fs;
wenzelm
parents: 3278
diff changeset
    77
\end{ttbox}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    78
7882
wenzelm
parents: 7849
diff changeset
    79
\medskip In the unfortunate case that neither local fonts work, nor accessing
wenzelm
parents: 7849
diff changeset
    80
our world-wide font service is practical, it might be best to start your own
wenzelm
parents: 7849
diff changeset
    81
in-house font service. This is in principle quite easy to setup. The program
wenzelm
parents: 7849
diff changeset
    82
is called \texttt{xfs} (sometimes just \texttt{fs)}, see the \texttt{man}
wenzelm
parents: 7849
diff changeset
    83
pages of your system. There is an example fontserver configuration available
wenzelm
parents: 7849
diff changeset
    84
in the \texttt{lib/fontserver} directory of the Isabelle distribution.
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3695
diff changeset
    85
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3695
diff changeset
    86
5364
ffa6d795c4b3 emacs local vars;
wenzelm
parents: 4555
diff changeset
    87
%%% Local Variables: 
ffa6d795c4b3 emacs local vars;
wenzelm
parents: 4555
diff changeset
    88
%%% mode: latex
ffa6d795c4b3 emacs local vars;
wenzelm
parents: 4555
diff changeset
    89
%%% TeX-master: "system"
ffa6d795c4b3 emacs local vars;
wenzelm
parents: 4555
diff changeset
    90
%%% End: