|
1.首先下载的penny的补丁了,就是那个附件(显示标签的中文)
保存到/usr/portage/app-text/xpdf/files/目录下面
修改xpdf-2.03.ebuild(3.0以上的版本看下面的回贴)如下所示
- # Copyright 1999-2004 Gentoo Technologies, Inc.
- # Distributed under the terms of the GNU General Public License v2
- # $Header: /home/cvsroot/gentoo-x86/app-text/xpdf/xpdf-2.03.ebuild,v 1.8 2004/01/31 19:05:48 lanius Exp $
-
- MY_PV=${PV/.1/pl1}
-
- S=${WORKDIR}/${PN}-${MY_PV}
- DESCRIPTION="An X Viewer for PDF Files"
- HOMEPAGE="http://www.foolabs.com/xpdf/"
- SRC_URI="ftp://ftp.foolabs.com/pub/xpdf/${PN}-${MY_PV}.tar.gz"
-
- LICENSE="GPL-2"
- SLOT="0"
- KEYWORDS="x86 ~ppc sparc alpha hppa ~amd64 ia64"
- IUSE="motif"
-
- DEPEND="motif? ( virtual/x11
- x11-libs/openmotif )
- >=media-libs/freetype-2.0.5
- >=media-libs/t1lib-1.3
- virtual/ghostscript"
- [color=red]
- src_unpack() {
- unpack ${P}.tar.gz
- cd ${S}
- epatch ${FILESDIR}/xpdf-2.03.diff.gz
- }
- [/color]
- src_compile() {
- econf \
- --enable-freetype2 \
- --with-freetype2-includes=/usr/include/freetype2 \
- --with-gzip || die
-
- make ${MAKEOPTS} || die
- }
-
- src_install() {
- make DESTDIR=${D} install || die
- prepallman
- dodoc README ANNOUNCE CHANGES
- insinto /etc
- doins ${FILESDIR}/xpdfrc
- }
-
- pkg_postinst() {
- einfo
- einfo "HINT: To have even nicer results add these lines to your ~/.xpdfrc"
- einfo
- einfo " include /etc/xpdfrc"
- einfo " t1libControl high"
- einfo " freetypeControl high"
- einfo
- }
复制代码
红色部分为添加的部分
emerge这个包
emerge xpdf-chinese-simplified(显示中文的内容)
2.配置:
修改/etc/xpdfrc成如下所示
- textEncoding GBK
- displayFontT1 Times-Roman /usr/share/ghostscript/fonts/n021003l.pfb
- displayFontT1 Times-Italic /usr/share/ghostscript/fonts/n021023l.pfb
- displayFontT1 Times-Bold /usr/share/ghostscript/fonts/n021004l.pfb
- displayFontT1 Times-BoldItalic /usr/share/ghostscript/fonts/n021024l.pfb
- displayFontT1 Helvetica /usr/share/ghostscript/fonts/n019003l.pfb
- displayFontT1 Helvetica-Oblique /usr/share/ghostscript/fonts/n019023l.pfb
- displayFontT1 Helvetica-Bold /usr/share/ghostscript/fonts/n019004l.pfb
- displayFontT1 Helvetica-BoldOblique /usr/share/ghostscript/fonts/n019024l.pfb
- displayFontT1 Courier /usr/share/ghostscript/fonts/n022003l.pfb
- displayFontT1 Courier-Oblique /usr/share/ghostscript/fonts/n022023l.pfb
- displayFontT1 Courier-Bold /usr/share/ghostscript/fonts/n022004l.pfb
- displayFontT1 Courier-BoldOblique /usr/share/ghostscript/fonts/n022024l.pfb
- displayFontT1 Symbol /usr/share/ghostscript/fonts/s050000l.pfb
- displayFontT1 ZapfDingbats /usr/share/ghostscript/fonts/d050000l.pfb
- #----- begin Chinese Simplified support package (2002-apr-18)
- cidToUnicode Adobe-GB1 /usr/share/xpdf/chinese-simplified/Adobe-GB1.cidToUnicode
- unicodeMap ISO-2022-CN /usr/share/xpdf/chinese-simplified/ISO-2022-CN.unicodeMap
- unicodeMap EUC-CN /usr/share/xpdf/chinese-simplified/EUC-CN.unicodeMap
- unicodeMap GBK /usr/share/xpdf/chinese-simplified/GBK.unicodeMap
- cMapDir Adobe-GB1 /usr/share/xpdf/chinese-simplified/CMap
- toUnicodeDir /usr/share/xpdf/chinese-simplified/CMap
- displayCIDFontX Adobe-GB1 "-*-simsun-medium-r-normal-*-%s-*-*-*-*-*-gb2312.1980-0" ISO-2022-CN
- #----- end Chinese Simplified support package
复制代码
在~/.Xdefaults里面加入资源项
xpdf*.fontList: -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1;-misc-simsun-medium-r-normal--12-*-*-*-*-*-gbk-0:
注意标点,另外确保使用的字体的确存在,然后
xrdb -merge ~/.Xdefaults
使修改生效
ok!enjoy吧! |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|