Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Printing Chinese Fonts from Mozilla
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
xkjyeah
n00b
n00b


Joined: 10 May 2003
Posts: 72

PostPosted: Wed Oct 29, 2003 1:08 pm    Post subject: Printing Chinese Fonts from Mozilla Reply with quote

WAS: Who can help me _print_ Chinese fonts out of Mozilla and its Firebird counterpart when gedit prints it out beautifully? I have Arphic fonts installed.

Use Xprint in Mozilla to print things correctly

Prerequisite: CUPS installed

1. Get the latest code from xprint.mozdev.org.
Code:

# tar xfz XXXX.tar.gz
# cd xprint/src/xprint_main/xc
# make World
# cd packager
# make make_xprint_tarball
# cd /
# tar xfz /tmp/XXXX.tar.gz

------------------------------------------------
2. First half complete. Now you should have an /xprint
directory at '/'. Personally what I did was copy
everything in /xprint/install, or
Code:

# cd /xprint/install
# cp -a * /
**** Some problem about xserver/ ****
**** WARNING: you have overwritten the
Xprt binary that came with XFree. ****
# cd usr/X11R6/lib/X11/xserver
# cp -a * /etc/X11/xserver
**** xserver is a symlink ****

or you could try
Code:

# /xprint/run_xprint_from_tarball.sh


Apparently the above limits the font path to
subdirectories of /usr/X11R6/lib/X11/fonts
with a font.dir.

I had problems using Xprint with a font server.
Having unix/:-1 as a font path will not work. For me
I used my own shell script. If you are adventurous, you should
try their /etc/init.d/xprint. Not gentoo-ised of
course, so using it with rc-update might be risky.
Initial investigations seem to reveal that any
directories NOT in /usr/X11R6/lib/X11/fonts will
not be included. That includes CJK fonts and Bitstream
fonts which are by default in /usr/share/fonts.

My Shell Script:
Code:

#!/bin/bash

export XPCONFIGDIR=/etc/X11/xserver

# Uncomment below to get FontPath by querying xset.
#FP=$(xset q | awk "/Font Path:/ { i=1 ; next } i==1 { print \$0 ; i=0 }")

# Uncomment all lines except the last below when querying xset.
# I declared the font list myself to avoid unix/:-1 (font server)
# from being used.
FP=/usr/share/fonts/ttf/korean/baekmuk,/usr/share/fonts/ttf/zh_CN,\
/usr/share/fonts/ttf/zh_TW,/usr/share/fonts/ttf/foreign/,\
/usr/share/fonts/ttf-bitstream-vera/,/usr/share/fonts/ttf/msttf/,\
/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/Speedo/,\
/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/CID/,\
/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/truetype/,\
/usr/X11R6/lib/X11/fonts/TTF/,/opt/blackdown-jdk-1.4.1/jre/lib/fonts/

Xprt -fp ${FP} :11


Somewhere in /etc/env.d/, like 00basic, add XPSERVERLIST=localhost:11.
Then "env-update". Run your shell script, and try printing from
Mozilla Firebird. If you use Mozilla, please grab a tarball from
mozilla.org because if you built Mozilla yourself, most likely it
has been built without Xprint. Install Mozilla into
$HOME/mozilla. Before running it, "unset MOZILLA_FIVE_HOME", then ./mozilla.

Fonts might appear rough without antialias. Anyway, go to
www.zaobao.com and print. Assuming your CUPS install is fine, you
should see something more than rectangles coming out of your printer,
unless you do not have the fonts. You should be able to select
<your printer>@localhost:11 as printer, not just Postscript/Default.




Resources: mozilla.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum