Favour <programlisting> over <screen> in some cases. Make sure that the

<programlisting> is outside of any enclosing paragraphs.
This commit is contained in:
Nik Clayton 2001-07-12 10:14:36 +00:00
parent d528fae271
commit 2a890510dc
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=9859

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.24 2001/07/11 16:07:50 murray Exp $
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.25 2001/07/11 19:13:52 nik Exp $
-->
<chapter id="x11">
@ -1459,7 +1459,8 @@ EndSection</programlisting>
<para>The <varname>DefaultColorDepth</varname> keyword describes
the color depth the user wishes to run at by default. This can
be overridden with the <command>-bpp</command> command line
switch to &man.XFree86.1;. The Modes keyword describes the
switch to <citerefentry><refentrytitle>XFree86</refentrytitle>
<manvolnum>1</manvolnum></citerefentry>. The Modes keyword describes the
resolution the user wishes to run at for the given color depth.
In the example above, the default color depth is twenty four
bits per pixel. At this color depth, the accepted resolution is
@ -1479,7 +1480,8 @@ EndSection</programlisting>
<para>Finally, the user can write out the configuration file and
test it using the test mode given above. If all is well, then
the configuration file needs to be installed in a common
location where &man.XFree86.1; can source it in the future.
location where <citerefentry><refentrytitle>XFree86</refentrytitle>
<manvolnum>1</manvolnum></citerefentry> can source it in the future.
This is typically <filename>/etc/X11/XF86Config</filename> or
<filename>/usr/X11R6/etc/X11/XF86Config</filename>.</para>
@ -1487,8 +1489,9 @@ EndSection</programlisting>
<para>Once the configuration file has been placed in a common
location, XFree86 can then be used through &man.xdm.1;. In
order to use &man.startx.1; the user will have to install the
<filename>X11/wrapper</filename> port.</para>
order to use <citerefentry><refentrytitle>startx</refentrytitle>
<manvolnum>1</manvolnum></citerefentry> the user will have to install
the <filename>X11/wrapper</filename> port.</para>
</sect2>
@ -1551,24 +1554,28 @@ EndSection</programlisting>
TrueType fonts with a minimum of effort: see the
<link linkend="truetype">section on TrueType fonts</link> later.</para>
<para>To install the above Type1 font collections, all you have
to do is
<screen>
&prompt.root; <userinput>cd /usr/ports/x11-fonts/urwfonts</userinput>
&prompt.root; <userinput>make install clean</userinput> </screen>
and likewise with the freefont or other collections. To tell the X server
<para>To install the above Type1 font collections from the ports
collection you can run the following commands.</para>
<screen>&prompt.root; <userinput>cd /usr/ports/x11-fonts/urwfonts</userinput>
&prompt.root; <userinput>make install clean</userinput></screen>
<para>And likewise with the freefont or other collections. To tell the X server
that these fonts exist, you can add an appropriate line
to your <filename>XF86Config</filename> file (in
<filename>/etc/</filename> for <application>XFree86</application>
version 3, or in <filename>/etc/X11/</filename> for version 4),
which reads
<screen> FontPath "/usr/X11R6/lib/X11/fonts/URW/" </screen>
Alternatively, at the command line in your X session you can write
<screen>
&prompt.user; <userinput>xset fp+ /usr/X11R6/lib/X11/fonts/URW</userinput>
&prompt.user; <userinput>xset fp rehash</userinput>
</screen>
This will work but will be lost when you log out from this
which reads:</para>
<programlisting>FontPath "/usr/X11R6/lib/X11/fonts/URW/"</programlisting>
<para>Alternatively, at the command line in your X session you can
write:</para>
<screen>&prompt.user; <userinput>xset fp+ /usr/X11R6/lib/X11/fonts/URW</userinput>
&prompt.user; <userinput>xset fp rehash</userinput></screen>
<para>This will work but will be lost when you log out from this
session, unless you add it to your startup file
(<filename>~/.xinitrc</filename> for a normal startx session,
or <filename>~/.xsession</filename> when logging in through a
@ -1588,9 +1595,9 @@ EndSection</programlisting>
in this example because it is more consistent with the other font
rendering backends. To enable the freetype module just add the
following line to the module section of your
<filename>/etc/X11/XF86Config</filename> file.
<screen>Load "freetype"</screen>
</para>
<filename>/etc/X11/XF86Config</filename> file.</para>
<programlisting>Load "freetype"</programlisting>
<para>For <application>XFree86</application> 3.3.X you will need
to run a separate TrueType font
@ -1646,9 +1653,11 @@ EndSection</programlisting>
<para>First, you need to tell the X server about the fonts which you
want anti-aliased. To do that, for each font directory you have
a line, which looks like
<screen>dir "/usr/X11R6/lib/X11/Type1"</screen>
and likewise for the other font directories (URW, truetype, etc)
a line, which looks like this:</para>
<programlisting>dir "/usr/X11R6/lib/X11/Type1"</programlisting>
<para>And likewise for the other font directories (URW, truetype, etc)
containing fonts you'd like anti-aliased. Anti-aliasing makes
sense only for scalable fonts (basically, Type1 and TrueType) so
don't include bitmap font directories here. The
@ -1659,47 +1668,45 @@ EndSection</programlisting>
(Antialiasing makes borders slightly fuzzy, which makes very
small text more readable and removes "staircases" from large text,
but can cause eyestrain if applied to normal text.) To exclude
point sizes between 9 and 13 from anti-aliasing, include the
lines
<screen>
match
point sizes between 9 and 13 from anti-aliasing, include these
lines:</para>
<programlisting>match
any size > 8
any size < 14
edit
antialias = false;
</screen>
You may also find that the spacing for some monospaced fonts
antialias = false;</programlisting>
<para>You may also find that the spacing for some monospaced fonts
gets messed up when you turn on anti-aliasing. This seems to
be an issue with KDE, in particular. One possible fix for this
is to force the spacing for such fonts to be 100: add the
following lines
<screen>
match any family == "fixed" edit family =+ "mono";
match any family == "console" edit family =+ "mono";
</screen>
(this aliases the other common names for fixed fonts as "mono"),
and then
<screen>
match any family == "mono" edit spacing = 100;
</screen>
Supposing you want to use the Lucidux fonts whenever monospaced
following lines:</para>
<programlisting>match any family == "fixed" edit family =+ "mono";
match any family == "console" edit family =+ "mono";</programlisting>
<para>(this aliases the other common names for fixed fonts as "mono"),
and then add:</para>
<programlisting>match any family == "mono" edit spacing = 100;</programlisting>
<para>Supposing you want to use the Lucidux fonts whenever monospaced
fonts are required (these look nice, and don't seem to suffer
from the spacing problem), you could replace that last line
with
<screen>
match any family == "mono" edit family += "LuciduxMono";
with these:</para>
<programlisting>match any family == "mono" edit family += "LuciduxMono";
match any family == "Lucidux Mono" edit family += "LuciduxMono";
match any family == "LuciduxMono" edit family =+ "Lucidux Mono";
</screen>
(the last lines alias different equivalent family names).</para>
match any family == "LuciduxMono" edit family =+ "Lucidux Mono";</programlisting>
<para>(the last lines alias different equivalent family names).</para>
<para>Finally, you want to allow users to add commands to this
file, via their personal <filename>.xftconfig</filename>
files. To do this, add a last line,
<screen>
includeif "~/.xftconfig"
</screen>
</para>
files. To do this, add a last line:</para>
<programlisting>includeif "~/.xftconfig"</programlisting>
<para>That's all; anti-aliasing should be enabled the next
time you start the X server. However, note that your programs must
@ -1713,7 +1720,6 @@ includeif "~/.xftconfig"
<para>Anti-aliasing is still new to FreeBSD and XFree86;
configuring it should get easier with time, and it will soon be
supported by many more applications.</para>
</sect2>
</sect1>