Hi

I wrote a small script for installing ttf fonts on a fresh mandrake 7.0
installation. It was intended for the recent instapary, and seemed to work
there almost flawlessly. I hope you'll find it useful.

The script tries (in a very limited manner) to locate the directory where
windows' fonts are installed, copies some of them to
/usr/share/fonts/TtfHeb , and adds this dir to the font path of xfs .

I put it in:
http://www.technion.ac.il/~tzafrir/heb-font-from-win.pl.txt
for the moment

It relies on the following:
1. a large portion of the installees had a copy of hebrew windows on a
seperate partition
2. Mandrake's graphical installer (DrakeX) automatically mounts fat
partitions as /mnt/DOS_<dev name> (i.e. /mnt/DOS_hda1)
3. you would expect to find the windows fonts dir on /.*win.*\/fonts/i
under one of those partitions (proved to be correct, but this script does
not assume so)
4. There are many TTFs in that directory. Some may be broken. I chose to
copy only a limited set of fonts which I have tried, and seem correct.

The part of locating windows' fonts directory is very limited and
unambitious. The user can always locate the directory for the script by
running the script from that directory.

The script should work on any system where there is an X
server that supports TTFs and where 'chkfontpath --add `pwd`' will add the
current directory to the font path of the X fonts server. This should be
correct for any RedHat >= 6.0 and Mandrake >= 6.0 .

I am not a very good perl coder, so the style could be improved.

Also - anyone has any idea how can the script list all the iso8859-8 fonts
that are offered by the X fonts server?

BTW: one other useful alias that works on a Mandrake 7.0 system:
alias xsu='su -c "DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY $SHELL"'

'xsu -' functions the same as 'su -', only it sets the X display settings
properly. I presume that it is a bit better than 
xhost +localhost; su -c "DISPLAY=$DISPLAY $SHELL"

-- 
Tzafrir Cohen
http://www.technion.ac.il/~tzafrir


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to