LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 838|回复: 1

问一个TeX&simsun.ttc&simsun.ttf的问题

[复制链接]
发表于 2005-9-6 00:24:00 | 显示全部楼层 |阅读模式
发信人: sakulaqi (sakulaqi), 信区: LinuxApp
标  题: 问一个TeX&simsun.ttc&simsun.ttf的问题
发信站: 水木社区 (Tue Sep  6 00:18:16 2005), 站内

搞了好几天的TeX+LaTex
在utf8的locale下
找到了一个伪装unicode的字体的办法
是把网上一位大侠的脚本改了改弄的
现在的问题是:
simhei.ttf,simli.ttf,simfang.ttf这种truetype fonts都能正常工作
但是只有simsun.ttf不能
补一个测试记录:
现在TeX等的情况:
如果.tex是cp936
latex     good
*.dvi     good
dvips     bad
dvipdf    bad
dvipdfm   good
dvipdfmx  bad
___________________________________________________________________________
dvipdfmx test2.dvi                                                        |
test2.dvi -> test2.pdf                                                    |
[1                                                                        |
** ERROR ** Could not find encoding file "UniGB-UCS2-H".                  |
Output file removed.                                                      |
__________________________________________________________________________|

if the .tex encoding is utf-8 :
use other fonts eg: hei ,fs, li is good
but only  song is bad,and all of them is not work!
这个被大家称作simsun.ttf的字体当然是mv simsun.ttc simsun.ttf的吧
我用如下命令发现它不是真正的truetype
file simli.ttf
simli.ttf: TrueType font data

file simsun.ttf or simsun.ttc
simsun.ttf: data
现在不能正常工作的原因是:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[sakulaqi@darkstar test]$ pdflatex song.tex
This is pdfeTeX, Version 3.14159-1.10b-2.1 (Web2C 7.4.5)
entering extended mode
(./song.tex{/usr/local/share/texmf/pdftex/config/pdftex.cfg}
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, b
ahasa, basque, catalan, croatian, czech, danish, dutch, finnish, greek, iceland
ic, irish, italian, latin, magyar, norsk, norsk, portuges, romanian, russian, s
lovak, slovene, spanish, swedish, turkish, ukrainian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/latex/CJK/CJK.sty
(/usr/share/texmf/tex/latex/CJK/mule/MULEenc.sty)
(/usr/share/texmf/tex/latex/CJK/CJK.enc))
(/usr/share/texmf/tex/latex/CJK/UTF8/UTF8.bdg)
(/usr/share/texmf/tex/latex/CJK/UTF8/UTF8.enc)
(/usr/share/texmf/tex/latex/CJK/UTF8/UTF8.chr)
No file song.aux.
(/usr/local/share/texmf/tex/latex/CJK/UTF8/c70song.fd) [1{/var/lib/texmf/dvips/
config/pdftex.map}{/usr/local/share/texmf/pdftex/config/gbksong.map}{/usr/local
/share/texmf/pdftex/config/gbkhei.map}{/usr/local/share/texmf/pdftex/config/gbk
li.map}{/usr/local/share/texmf/pdftex/config/cyberb.map}{/usr/local/share/texmf
/dvips/config/unisong.map}] (./song.aux) ){/usr/local/share/texmf/dvips/unicjk/
unisong/unisong8b.enc}</usr/local/share/texmf/fonts/truetype/unicjk/unisong.ttf

Error: pdflatex (file /usr/local/share/texmf/fonts/truetype/unicjk/unisong.ttf)
: can't find table `maxp'
==> Fatal error occurred, the output PDF file is not finished!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

注意上面就是这个错误!!!!!!!!!!!!!!!!

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[sakulaqi@darkstar test]$ latex song.tex
This is e-TeX, Version 3.14159-2.1 (Web2C 7.4.5)
entering extended mode
(./song.tex
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, b
ahasa, basque, catalan, croatian, czech, danish, dutch, finnish, greek, iceland
ic, irish, italian, latin, magyar, norsk, norsk, portuges, romanian, russian, s
lovak, slovene, spanish, swedish, turkish, ukrainian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/latex/CJK/CJK.sty
(/usr/share/texmf/tex/latex/CJK/mule/MULEenc.sty)
(/usr/share/texmf/tex/latex/CJK/CJK.enc))
(/usr/share/texmf/tex/latex/CJK/UTF8/UTF8.bdg)
(/usr/share/texmf/tex/latex/CJK/UTF8/UTF8.enc)
(/usr/share/texmf/tex/latex/CJK/UTF8/UTF8.chr)
No file song.aux.
(/usr/local/share/texmf/tex/latex/CJK/UTF8/c70song.fd) [1] (./song.aux) )
Output written on song.dvi (1 page, 980 bytes).
Transcript written on song.log.
[sakulaqi@darkstar test]$ dvips song.dvi
This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com)
' TeX output 2005.09.04:2213' -> song.ps
dvips: ! Couldn't find header file unisong.ttf
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

这是latex正常而dvips错误
如果按王垠的说明dvips用的是type1字体的话这个错误也不过过不过它为什么会说
Couldn't find header file unisong.ttf呢?
不是很明白,我的字体明显在那里,而且其它字体可以工作这一点可以证明

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

另外我怀疑是关于ttc和ttf字体的问题还由于下面的一段错误

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[sakulaqi@darkstar test]$ xdvi song.dvi
xdvi: Warning: Font map calls for unisong.ttf, but it was not found (will try PK
version instead).
kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+0/600 --dpi 600 uni
song8b
mktexpk: Running gsftopk unisong8b 600
gsftopk(k) version 1.19.2/815
[0gs: Error: /undefined in ttcf
gs: Operand stack:
gs:
gs: Execution stack:
gs:    %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostring
val--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--
  false   1   %stopped_push   1   3   %oparray_pop   1   3   %oparray_pop   1
3   %oparray_pop   1   3   %oparray_pop   .runexec2   --nostringval--   --nostri
ngval--   --nostringval--   2   %stopped_push   --nostringval--   1   3   %oparr
ay_pop   1   3   %oparray_pop   1   3   %oparray_pop   1   3   %oparray_pop   .r
unexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_pus
h   --nostringval--
gs: Dictionary stack:
gs:    --dict:1117/1686(ro)(G)--   --dict:0/20(G)--   --dict:95/200(L)--
gs: Current allocation mode is local
gs: Current file position is 5
GPL Ghostscript 8.15: Unrecoverable error, exit code 1

Premature end of file
grep: unisong8b.log: 没有那个文件或目录
mktexpk: `gsftopk unisong8b 600' failed to make unisong8b.600pk.
kpathsea: Appending font creation commands to missfont.log.
Checksum mismatch (dvi = 3739495296, pk = 1274110073) in font file /var/cache/fo
nts/pk/ljfour/public/cm/cmr10.600pk
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

而我仔细看过王垠的主页上的相关说明发现了一条:

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ConTeXt 中文支持安装指南
中:
常见问题
        1. 安装完毕测试上面的文件出现错误:

Error: pdfetex (file /usr/share/fonts/zh_CN/TrueType/simsun.ttf): can't find ta
ble `maxp'
==> Fatal error occurred, the output PDF file is not finished!

      这一般是由于你的 ttf 字体文件有错误。更换一个完好的ttf文件就可以了。
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
我拷过几个simsun.ttc or simsun.ttf都是一样没有作用

我用file查看文件格式发现和别的ttf字体显示的不一样也就是没有truetype的说法
所以就在考虑ttc和ttf字体的不同之处,我对字体不是很了解,希望高人相助,不能让我用
simhei写东西吧。哈哈
如果弄好了我再把详细的方案写出来
或者用chroot测试,因为我的配置文件改得很乱,所以具体怎么做的就不帖出来了
系统为debian sid
--

※ 来源:·水木社区 newsmth.net·[FROM: 2.*]
发表于 2005-9-6 13:47:06 | 显示全部楼层
win98下的simsun.ttf肯定没有问题,我用的就是这个,可以到ftp://eelinux.3322.org下载。
winxp下和simsun.ttc肯定有问题,在ctex论坛中有定论。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表