木子方方土不土 發表於 2017-2-2 13:13:36

FreeBSD系统下安装字体的步骤详解

<p>FreeBSD下字体安装步骤详解,之前使用的默认字体不是太喜欢。 因为大型的字体显得参差不齐,这时有一款自己喜欢的字体最好不过了。<br />所以需要我们手工加入字体时,FreeBSD下字体安装步骤详解,可采用如下两种方式:</p>
<p>方法一、</p>
<p>添加Times Roman,Helvetica,Palatino等Type1字体,URW字体集合 (x11-fonts/urwfonts) 就包括了高质量的 标准 type1 字体。<br />因此安装URW即可:</p>
<p>1.1安装URW</p>
<p># cd /usr/ports/x11-fonts/urwfonts<br /># make install clean</p>
<p>1.2 配置URW<br />需要在 X 服务器的配置文件 (/etc/X11/xorg.conf) 中增加下面的配置:</p>
<p>FontPath &quot;/usr/local/lib/X11/fonts/URW/&quot;</p>
<p>也可采用命令方式在当前会话中执行,以下内容需要在X桌面的Terminal执行才可以。</p>
<p>% xset fp+ /usr/local/lib/X11/fonts/URW<br />% xset fp rehash</p>
<p>2、安装微软雅黑、宋体等等中文字体即 TrueType&reg; 字体<br />Xorg 已经内建了对 TrueType&reg; 字体的支持<br />2.1 配置文件<br />将下面这行添加到 /etc/X11/xorg.conf 文件的 &quot;Module&quot; 部分Load &quot;freetype&quot;<br />2.2为 TrueType&reg; 字体创建一个目录<br />比如, /usr/local/lib/X11/fonts/TrueType, 然后把所有的 TrueType&reg; 字体复制到这个目录。记住您不能直接从 Macintosh&reg; 计算机中提取TrueType&reg; 字体; 能被 X11 使用的必须是UNIX&reg;/MS-DOS&reg;/Windows&reg; 格式的。<br />2.3 用 ttmkfdir 来创建 fonts.dir 文件, 以便让X字体引擎知道您已经安装了这些新文件。<br />2.3.1 ttmkfdir 需要安装,直接用pkg_add -r ttmkfdir就能装上。<br />2.3.2</p>
<p># cd /usr/local/lib/X11/fonts/TrueType<br /># ttmkfdir -o fonts.dir</p>
<p>3.4 把 TrueType&reg; 字体目录添加到字体路径中<br />需要在 X 服务器的配置文件 (/etc/X11/xorg.conf) 中增加下面的配置:FontPath &quot;/usr/local/lib/X11/fonts/TrueType&quot;<br />如果要立即启用请输入:</p>
<p>% xset fp+ /usr/local/lib/X11/fonts/TrueType<br />% xset fp rehash</p>
<p>以上的命令操作,需要在X桌面的Terminal中执行才可以。<br />现在 Netscape&reg;,Gimp,StarOffice&trade; 和其他所有的 X 应用程序 应该可以认出安装的TrueType&reg; 字体。一些很小的字体,但如果是在 Web 页面上高分辨率显示的文本。 </p>
<p>FreeBSD下字体安装步骤详解,安装文泉驿中文字体:</p>
<p># whereis wqy<br />wqy: /usr/ports/x11-fonts/wqy<br /># cd /usr/ports/x11-fonts/wqy<br /># make install clean</p>
<p>整个过程需要时间在15分钟左右。iplaypy.com<br />让X系统启动时载入字体,编辑/etc/X11/xorg.conf 在Section &quot;Files&quot;里面加一行,FontPath &quot;/usr/local/lib/X11/fonts/wqy&quot;像下面这样</p>
<p>Section &quot;Files&quot;<br />ModulePath&nbsp; &quot;/usr/local/lib/xorg/modules&quot;<br />FontPath&nbsp;&nbsp;&nbsp; &quot;/usr/local/lib/X11/fonts/misc/&quot;<br />FontPath&nbsp;&nbsp;&nbsp; &quot;/usr/local/lib/X11/fonts/TTF/&quot;<br />FontPath&nbsp;&nbsp;&nbsp; &quot;/usr/local/lib/X11/fonts/OTF&quot;<br />FontPath&nbsp;&nbsp;&nbsp; &quot;/usr/local/lib/X11/fonts/Type1/&quot;<br />FontPath&nbsp;&nbsp;&nbsp; &quot;/usr/local/lib/X11/fonts/100dpi/&quot;<br />FontPath&nbsp;&nbsp;&nbsp; &quot;/usr/local/lib/X11/fonts/75dpi/&quot;<br />FontPath&nbsp;&nbsp;&nbsp; &quot;/usr/local/lib/X11/fonts/wqy&quot;<br />EndSection</p>
頁: [1]
查看完整版本: FreeBSD系统下安装字体的步骤详解