⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 x-fonts.html

📁 FreeBSD操作系统的详细使用手册
💻 HTML
📖 第 1 页 / 共 2 页
字号:
are properly closed. The file begins with the usual XML header followed by a DOCTYPEdefinition, and then the <var class="LITERAL">&lt;fontconfig&gt;</var> tag:</p><pre class="PROGRAMLISTING">      &lt;?xml version="1.0"?&gt;      &lt;!DOCTYPE fontconfig SYSTEM "fonts.dtd"&gt;      &lt;fontconfig&gt;   </pre><p>As previously stated, all fonts in <tt class="FILENAME">/usr/X11R6/lib/X11/fonts/</tt>as well as <tt class="FILENAME">~/.fonts/</tt> are already made available to Xft-awareapplications. If you wish to add another directory outside of these two directory trees,add a line similar to the following to <ttclass="FILENAME">/usr/X11R6/etc/fonts/local.conf</tt>:</p><pre class="PROGRAMLISTING">&lt;dir&gt;/path/to/my/fonts&lt;/dir&gt;</pre><p>After adding new fonts, and especially new font directories, you should run thefollowing command to rebuild the font caches:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">fc-cache -f</kbd></pre><p>Anti-aliasing makes borders slightly fuzzy, which makes very small text more readableand removes ``staircases'' from large text, but can cause eyestrain if applied to normaltext. To exclude font sizes smaller than 14 point from anti-aliasing, include theselines:</p><pre class="PROGRAMLISTING">        &lt;match target="font"&gt;            &lt;test name="size" compare="less"&gt;                &lt;double&gt;14&lt;/double&gt;            &lt;/test&gt;            &lt;edit name="antialias" mode="assign"&gt;                &lt;bool&gt;false&lt;/bool&gt;            &lt;/edit&gt;        &lt;/match&gt;        &lt;match target="font"&gt;            &lt;test name="pixelsize" compare="less" qual="any"&gt;                &lt;double&gt;14&lt;/double&gt;            &lt;/test&gt;            &lt;edit mode="assign" name="antialias"&gt;                &lt;bool&gt;false&lt;/bool&gt;            &lt;/edit&gt;        &lt;/match&gt;</pre><p>Spacing for some monospaced fonts may also be inappropriate with anti-aliasing. Thisseems to be an issue with <b class="APPLICATION">KDE</b>, in particular. One possible fixfor this is to force the spacing for such fonts to be 100. Add the following lines:</p><pre class="PROGRAMLISTING">       &lt;match target="pattern" name="family"&gt;           &lt;test qual="any" name="family"&gt;               &lt;string&gt;fixed&lt;/string&gt;           &lt;/test&gt;           &lt;edit name="family" mode="assign"&gt;               &lt;string&gt;mono&lt;/string&gt;           &lt;/edit&gt;        &lt;/match&gt;        &lt;match target="pattern" name="family"&gt;            &lt;test qual="any" name="family"&gt;                &lt;string&gt;console&lt;/string&gt;            &lt;/test&gt;            &lt;edit name="family" mode="assign"&gt;                &lt;string&gt;mono&lt;/string&gt;            &lt;/edit&gt;        &lt;/match&gt;</pre><p>(this aliases the other common names for fixed fonts as <varclass="LITERAL">"mono"</var>), and then add:</p><pre class="PROGRAMLISTING">         &lt;match target="pattern" name="family"&gt;             &lt;test qual="any" name="family"&gt;                 &lt;string&gt;mono&lt;/string&gt;             &lt;/test&gt;             &lt;edit name="spacing" mode="assign"&gt;                 &lt;int&gt;100&lt;/int&gt;             &lt;/edit&gt;         &lt;/match&gt;     </pre><p>Certain fonts, such as Helvetica, may have a problem when anti-aliased. Usually thismanifests itself as a font that seems cut in half vertically. At worst, it may causeapplications such as <b class="APPLICATION">Mozilla</b> to crash. To avoid this, consideradding the following to <tt class="FILENAME">local.conf</tt>:</p><pre class="PROGRAMLISTING">         &lt;match target="pattern" name="family"&gt;             &lt;test qual="any" name="family"&gt;                 &lt;string&gt;Helvetica&lt;/string&gt;             &lt;/test&gt;             &lt;edit name="family" mode="assign"&gt;                 &lt;string&gt;sans-serif&lt;/string&gt;             &lt;/edit&gt;         &lt;/match&gt;       </pre><p>Once you have finished editing <tt class="FILENAME">local.conf</tt> make sure you endthe file with the <var class="LITERAL">&lt;/fontconfig&gt;</var> tag. Not doing this willcause your changes to be ignored.</p><p>The default font set that comes with X11 is not very desirable when it comes toanti-aliasing. A much better set of default fonts can be found in the <ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/x11-fonts/bitstream-vera/pkg-descr"><ttclass="FILENAME">x11-fonts/bitstream-vera</tt></a> port. This port will install a <ttclass="FILENAME">/usr/X11R6/etc/fonts/local.conf</tt> file if one does not exist already.If the file does exist, the port will create a <ttclass="FILENAME">/usr/X11R6/etc/fonts/local.conf-vera</tt> file. Merge the contents ofthis file into <tt class="FILENAME">/usr/X11R6/etc/fonts/local.conf</tt>, and theBitstream fonts will automatically replace the default X11 Serif, Sans Serif, andMonospaced fonts.</p><p>Finally, users can add their own settings via their personal <ttclass="FILENAME">.fonts.conf</tt> files. To do this, each user should simply create a <ttclass="FILENAME">~/.fonts.conf</tt>. This file must also be in XML format.</p><p>One last point: with an LCD screen, sub-pixel sampling may be desired. This basicallytreats the (horizontally separated) red, green and blue components separately to improvethe horizontal resolution; the results can be dramatic. To enable this, add the linesomewhere in the <tt class="FILENAME">local.conf</tt> file:</p><pre class="PROGRAMLISTING">         &lt;match target="font"&gt;             &lt;test qual="all" name="rgba"&gt;                 &lt;const&gt;unknown&lt;/const&gt;             &lt;/test&gt;             &lt;edit name="rgba" mode="assign"&gt;                 &lt;const&gt;rgb&lt;/const&gt;             &lt;/edit&gt;         &lt;/match&gt;      </pre><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> Depending on the sort of display, <var class="LITERAL">rgb</var> may needto be changed to <var class="LITERAL">bgr</var>, <var class="LITERAL">vrgb</var> or <varclass="LITERAL">vbgr</var>: experiment and see which works best.</p></blockquote></div><p>Anti-aliasing should be enabled the next time the X server is started. However,programs must know how to take advantage of it. At present, the Qt toolkit does, so theentire <b class="APPLICATION">KDE</b> environment can use anti-aliased fonts (see <ahref="x11-wm.html#X11-WM-KDE-ANTIALIAS">Section 5.7.3.2</a> on <bclass="APPLICATION">KDE</b> for details). GTK+ and <b class="APPLICATION">GNOME</b> canalso be made to use anti-aliasing via the ``Font'' capplet (see <ahref="x11-wm.html#X11-WM-GNOME-ANTIALIAS">Section 5.7.1.3</a> for details). By default,<b class="APPLICATION">Mozilla</b> 1.2 and greater will automatically use anti-aliasing.To disable this, rebuild <b class="APPLICATION">Mozilla</b> with the <ttclass="MAKEVAR">-DWITHOUT_XFT</tt> flag.</p></div></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="x-config.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="x-xdm.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">X11 Configuration</td><td width="34%" align="center" valign="top"><a href="x11.html" accesskey="U">Up</a></td><td width="33%" align="right" valign="top">The X Display Manager</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting &#60;<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>&#62;.<br />For questions about this documentation, e-mail &#60;<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>&#62;.</small></p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -