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