LinuxSir.cn,穿越时空的Linuxsir!

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

firefox打印时无法显示汉字,为方块,请问XDJM们是什么原因?

[复制链接]
发表于 2005-4-10 10:04:13 | 显示全部楼层 |阅读模式
打印office是好的,但直接打印网页或下载网页后打印就不行了,凡是网上的中文打印就变成方块了,哪位大侠帮帮我。这个问题很久了 :help  :help  :help
发表于 2005-4-10 10:10:43 | 显示全部楼层
记得 linuxaid 有一篇很老的文章
不过你的浏览器是什么, 操作系统是什么版本?
回复 支持 反对

使用道具 举报

发表于 2005-4-10 15:18:58 | 显示全部楼层
这篇上提到http://linux.hiweed.com/node/1556

Mozilla Firefox

Mozilla Firefox在使用打印机前,需要进行简单的设置。编辑文件/usr/lib/mozilla-firefox/defaults/pref/unix.js,并加入如下两行:

pref("font.FreeType2.enable", true);

pref("font.directory.truetype.1","/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType/");

在Firefox的软件包中,上述文件并不存在,不用担心,加上就可以了。
回复 支持 反对

使用道具 举报

发表于 2005-4-10 18:04:21 | 显示全部楼层
pref("font.directory.truetype.1","/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType/");

这里的配置一看就是 debian 专用的, fedora 没有 /var/lib/defoma, 也许应该替换成字体目录?
第一条配置也不对劲啊, 那肯定是默认值

打印机不带硬字库真不方便
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-12 22:56:37 | 显示全部楼层
那我怎么改?总算有人知道,谢谢,
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-12 23:03:44 | 显示全部楼层
我的系统是FC3,浏览器是Mozilla Firefox
版主让我看到了希望:)
那篇文章我看了,现在还是不能解决。
回复 支持 反对

使用道具 举报

发表于 2005-4-12 23:25:07 | 显示全部楼层
从 google 搜索到一个帖子, 讲的办法没想到也是添加那两句话
那就照葫芦画瓢, 把第二句的字体目录换成你机器上的, 试试看呢

Re: Problem with the chinese print-out in Firefox and Openoffice (分數: 1)
由 zunix 於 3月24日 (星期四) 上午11:25
(使用者資? | 寄出?息)  
Email from user

I am writing to seek your help on my problem with the Chinese print-out in Firefox and Openoffice.

I had already downloaded and installed the fireflysung fonts which you posted on 07 December 2004 ( Fedora Core 1A Core 2 Core 3 [JO). It works perfectly well. Thanks for your article.

Both the Firefox and Openoffice can perfectly display Chinese content including Chinese file name, but the Chinese print-out are far away from what I expected as compared to the display. For Firefox, Chinese characters were printed with a little square whilst blank represented Chinese characters were printed in Openoffice. Please note that I am currently using Fedora Core 1

Reply to problem

Firefox Print Chinese
To print chinese in firefox you should add the follow lines (font path and enable freetype):

pref("font.FreeType2.enable", true);
pref("font.directory.truetype.1","/usr/share/fonts/fireflysung/");

in the configuration file of firefox to tell software where to find font to print (display font and print font are handling individually)

/usr/lib/firefox-1.0.1/defaults/pref/firefox.js (this is global setting)
.mozilla/firefox/da29nz3t.default/prefs.js (user's only setting, "da29nz3t.default" directory randomly generated, so the name in you Linux is different)

OpenOffice Print Chinese
Theorically, you can see then you can print. May be 1.1 is quite old version. In order to fix this problem, you should use the printer administration provided by OpenOffice. In the interface, there are a button name "fonts". Press that button and add the Chinese fonts which you are using. They common all store under the /usr/share/fonts directory. After you added fonts, the problem should solve. Further you should go to the setting of OpenOffice to tune the Language setting. Most of them only are configured to support English only.
回复 支持 反对

使用道具 举报

发表于 2005-4-13 01:59:06 | 显示全部楼层
我也装了fc4,可是开机进去的时候所有的中文字体都变成了方框了,各位大哥,我是个新手,请问怎么办啊
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-13 10:21:45 | 显示全部楼层
请问firefox的字体是在哪个目录?我找了半天都找不到英文贴里的目录,我没它那个目录,好像我是指定安装到别的目录下,firefox目录下的哪个目录是字体,我找了没有。别笑我,我是菜鸟
回复 支持 反对

使用道具 举报

发表于 2005-4-13 11:58:56 | 显示全部楼层
系统字体目录, /usr/share/fonts/zh_CN/TrueType
回复 支持 反对

使用道具 举报

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

本版积分规则

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