FreeBSD安装各种字体
2013-12-27 11:16
267 查看
X11 使用的默认字体不是很理想。 大型的字体显得参差不齐,打开浏览器一看中文就能吐血而亡。
因此,需要我们手工加入字体,可采用如下两种方式:
1、添加Times Roman,Helvetica,Palatino等Type1字体
URW字体集合 (x11-fonts/urwfonts) 就包括了高质量的 标准 type1 字体。因此安装URW即可:
1.1安装URW
需要在 X 服务器的配置文件 (
也可采用命令方式在当前会话中执行,以下内容需要在X桌面的Terminal执行才可以。
2、安装微软雅黑、宋体等等中文字体即 TrueType® 字体
Xorg 已经内建了对 TrueType® 字体的支持
2.1 配置文件
将下面这行添加到
2.2为 TrueType® 字体创建一个目录
比如,
TrueType® 字体复制到这个目录。记住您不能直接从 Macintosh® 计算机中提取TrueType® 字体; 能被 X11 使用的必须是UNIX®/MS-DOS®/Windows®
格式的。
2.3 用 ttmkfdir 来创建
2.3.1 ttmkfdir 需要安装,直接用pkg_add -r ttmkfdir就能装上。
2.3.2
3.4 把 TrueType® 字体目录添加到字体路径中
需要在 X 服务器的配置文件 (
如果要立即启用请输入:(以下命令需要在X桌面的Terminal中执行才可以)
就是这样。现在 Netscape®,Gimp,StarOffice™ 和其他所有的 X 应用程序 应该可以认出安装的TrueType®
字体。一些很小的字体(如在 Web 页面上高分辨率显示的文本) 和一些很大的字体(在StarOffice™ 下) 现在看起来已经很好了。
3、安装文泉驿中文字体:
# whereis wqy
wqy: /usr/ports/x11-fonts/wqy
# cd /usr/ports/x11-fonts/wqy
# make install clean
15分钟左右ok
让X系统启动时载入字体。
编辑/etc/X11/xorg.conf
在Section "Files"里面加一行,FontPath "/usr/local/lib/X11/fonts/wqy"像下面这样
Section "Files"
ModulePath "/usr/local/lib/xorg/modules"
FontPath "/usr/local/lib/X11/fonts/misc/"
FontPath "/usr/local/lib/X11/fonts/TTF/"
FontPath "/usr/local/lib/X11/fonts/OTF"
FontPath "/usr/local/lib/X11/fonts/Type1/"
FontPath "/usr/local/lib/X11/fonts/100dpi/"
FontPath "/usr/local/lib/X11/fonts/75dpi/"
FontPath "/usr/local/lib/X11/fonts/wqy"
EndSection
因此,需要我们手工加入字体,可采用如下两种方式:
1、添加Times Roman,Helvetica,Palatino等Type1字体
URW字体集合 (x11-fonts/urwfonts) 就包括了高质量的 标准 type1 字体。因此安装URW即可:
1.1安装URW
# cd /usr/ports/x11-fonts/urwfonts # make install clean1.2 配置URW
需要在 X 服务器的配置文件 (
/etc/X11/xorg.conf) 中增加下面的配置:
FontPath "/usr/local/lib/X11/fonts/URW/"
也可采用命令方式在当前会话中执行,以下内容需要在X桌面的Terminal执行才可以。
% xset fp+ /usr/local/lib/X11/fonts/URW % xset fp rehash
2、安装微软雅黑、宋体等等中文字体即 TrueType® 字体
Xorg 已经内建了对 TrueType® 字体的支持
2.1 配置文件
将下面这行添加到
/etc/X11/xorg.conf文件的
"Module"部分
Load "freetype"
2.2为 TrueType® 字体创建一个目录
比如,
/usr/local/lib/X11/fonts/TrueType, 然后把所有的
TrueType® 字体复制到这个目录。记住您不能直接从 Macintosh® 计算机中提取TrueType® 字体; 能被 X11 使用的必须是UNIX®/MS-DOS®/Windows®
格式的。
2.3 用 ttmkfdir 来创建
fonts.dir文件, 以便让X字体引擎知道您已经安装了这些新文件。
2.3.1 ttmkfdir 需要安装,直接用pkg_add -r ttmkfdir就能装上。
2.3.2
# cd /usr/local/lib/X11/fonts/TrueType # ttmkfdir -o fonts.dir
3.4 把 TrueType® 字体目录添加到字体路径中
需要在 X 服务器的配置文件 (
/etc/X11/xorg.conf) 中增加下面的配置:
FontPath "/usr/local/lib/X11/fonts/TrueType"
如果要立即启用请输入:(以下命令需要在X桌面的Terminal中执行才可以)
% xset fp+ /usr/local/lib/X11/fonts/TrueType % xset fp rehash
就是这样。现在 Netscape®,Gimp,StarOffice™ 和其他所有的 X 应用程序 应该可以认出安装的TrueType®
字体。一些很小的字体(如在 Web 页面上高分辨率显示的文本) 和一些很大的字体(在StarOffice™ 下) 现在看起来已经很好了。
3、安装文泉驿中文字体:
# whereis wqy
wqy: /usr/ports/x11-fonts/wqy
# cd /usr/ports/x11-fonts/wqy
# make install clean
15分钟左右ok
让X系统启动时载入字体。
编辑/etc/X11/xorg.conf
在Section "Files"里面加一行,FontPath "/usr/local/lib/X11/fonts/wqy"像下面这样
Section "Files"
ModulePath "/usr/local/lib/xorg/modules"
FontPath "/usr/local/lib/X11/fonts/misc/"
FontPath "/usr/local/lib/X11/fonts/TTF/"
FontPath "/usr/local/lib/X11/fonts/OTF"
FontPath "/usr/local/lib/X11/fonts/Type1/"
FontPath "/usr/local/lib/X11/fonts/100dpi/"
FontPath "/usr/local/lib/X11/fonts/75dpi/"
FontPath "/usr/local/lib/X11/fonts/wqy"
EndSection
相关文章推荐
- freebsd|odoo - 为odoo报表 安装文泉译中文字体
- 如何为FreeBSD系统安装字体
- FreeBSD 下安装Fireflysung字体
- linux中安装各种字体
- 邮件系统安装与使用过程中各种报错与问题的详细解决方法
- FreeBSD从零开始---系统安装(三)
- virtualbox下安装freebsd后使用putty登陆
- linux 安装软件出现的各种问题汇总
- win 8.1 安装 SQL server 遇到的各种问题
- i386™ 系统开始安装FreeBSD第一步
- FreeBSD 4.9下安装 JDK1.4.2的说明
- unix下各种包安装方法备忘
- 在机器里安装FreeBSD,LINUX和WindowsXP操作系统
- 在FreeBSD下安装PHP5
- FreeBSD从光盘安装gnome桌面
- 用Adobe Distiller从ps产生包含各种字体的pdf文件
- 解决安装Intel各种驱动提示“安装程序未能安装一个或多个设备驱动程序”的问题
- freebsd下gdm的安装
- 各种ORM安装