You are not logged in.
Pages: 1
On the wiki, there appears to be two ways to install MS Fonts.
Option 1 -- Install the ttf-ms-fonts package
(see Wiki entry http://wiki.archlinux.org/index.php/Fonts)
Option 2 - Download and install a tarball
(see http://wiki.archlinux.org/index.php/MS_Fonts)
The accuracy of the info for Option 2 is disputed.
The commands suggested to be used for option 2 are:
# tar zxvf msfonts-1.2.1.tar.gz
# cp -a msfonts-1.2.1/main /usr/X11R6/lib/X11/fonts/ms
# cd /usr/X11R6/lib/X11/fonts/ms
# ttmkfdir >fonts.scale
# mkfontdir
# fc-cache -v
Hmm.. I thought ttmkdir is deprecated and no longer used with the newer versions of X... (See font FAQ on Wiki where it states:
"The "mkfontdir" and "mkfontscale" utilities should be used on Xfree86 4.3.0 based setups while on older ones (4.2.x) "ttmkfdir" should be considered. I've noticed that "ttmkfdir" and "mkfontdir" do not produce the exact same files"
What is the easiest way to install MS fonts? Just use ttf-ms-fonts package?
How should I install other TTF fonts from my WIndows partition? Just copy them over to my Linux font dir and run #mkfontdir and #fc-cache -v?
Rob
Offline
Here's the install script for the ttf-ms-fonts package, if that helps:
# arg 1: the new package version
post_install() {
echo -n "extracting fonts... "
for font in tmp/ttf-ms-fonts/*.exe
do
cabextract --lowercase --directory=tmp/ttf-ms-fonts/ $font >/dev/null 2>&1
done
mkdir -p usr/X11R6/lib/X11/fonts/TTF
: >usr/X11R6/lib/X11/fonts/TTF/msfonts.txt
for i in `/bin/ls tmp/ttf-ms-fonts/*.ttf`; do
echo `basename $i` >>usr/X11R6/lib/X11/fonts/TTF/msfonts.txt
cp $i usr/X11R6/lib/X11/fonts/TTF
done
echo "done."
echo -n "rebuilding font cache... "
/usr/bin/fc-cache
cd /usr/X11R6/lib/X11/fonts/TTF
../../../../bin/mkfontscale
../../../../bin/mkfontdir
cp ../encodings/encodings.dir ./encodings.dir
echo "done."
rm -rf tmp/ttf-ms-fonts
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
# remove fonts from their old location
rm -rf usr/X11R6/lib/X11/fonts/ttf-ms-fonts
post_install $1
}
# arg 1: the old package version
pre_remove() {
#rm -f usr/X11R6/lib/X11/fonts/TTF/
[ -f usr/X11R6/lib/X11/fonts/TTF/msfonts.txt ] || return
for i in `cat usr/X11R6/lib/X11/fonts/TTF/msfonts.txt`; do
rm -f usr/X11R6/lib/X11/fonts/TTF/$i
done
rm -f usr/X11R6/lib/X11/fonts/TTF/msfonts.txt
}
# arg 1: the old package version
post_remove() {
echo -n "rebuilding font cache... "
/usr/bin/fc-cache
cd /usr/X11R6/lib/X11/fonts/TTF
../../../../bin/mkfontscale
../../../../bin/mkfontdir
cp ../encodings/encodings.dir ./encodings.dir
echo "done."
}
op=$1
shift
$op $*
This approach works fine. Of course, I don't know the *correct* approach though.
Offline
Thanks for reply. I was not thinking. I should have looked at the install script for the MS FONTS Package. Duh!
I see that the install script uses mkfontscale and mkfontdir. Not ttmkfdir. So I will stay away from the instaructions in the wiki for MS Fonts! I can see why that entry is disputed.
I also see that the install script creates a text file msfonts.txt. I suspect that this file is created to aid in removing or uninstalling the MS fonts.
So it looks like the easist way to install ms fonts is just use the Arch package.
If one wants to install other TTF fonts, just copy them over to the linux TTF dir and run the commands shown in the install script. (e.g. mkfontscale and mkfontdir etc).
Rob
Offline
You could always edit the wiki yourself to add an "alternative" approach if the method currently uploaded is out of date. (If you think others would find it interesting.)
You could check out other ttf packages and see what their install files say and see if you can find any common ground.
Offline
Pages: 1