PDA

View Full Version : Adding Fonts



mb456
08-04-2004, 08:07 AM
Hello,
I have some serious trouble adding fonts to the master cd.
My Intention is to let a friend of mine evaluate scribus and compare it against MS Publisher in a professional environment.
For his work he has to use six or so unfree fonts wich I am not getting to work.
So far I have successfully
- unpacked the cloop-image
- removed some of the packages
- tweaked some settings
- generated a new compressed image
- burnt a new bootable cd.

Regarding font-install I tried
- adding the font files to /usr/share/fonts/nonfree/[type1|ttf]
- kfontinstall cfgdir /usr/share/fonts/nonfree/[type1|ttf]
- adding "FontPath..." to /etc/X11/XF86-Config-4

Now after booting, xset q proves the new font-paths have been accepted and xfontsel shows the fonts are accessible. However, Scribus won't let me select these fonts, no matter how hard I try.

So did I do anything wrong while installing the fonts? Or is there some higher magic with scribus?

Thanks in advance

mb

eekarum
08-05-2004, 02:10 AM
Are you trying to remaster knoppix with the new fonts?

If so, you can chroot to your knoppix source, and do what I did, without need for the KDE font installer :

With some exceptions, most debian font packages put their TrueType fonts in /usr/share/fonts
and X Fonts / Type1 fonts go in: /usr/X11R6/lib/X11/fonts

So make a directory under /usr/share/fonts -- lets say /usr/share/fonts/MSPUBLISHERFONTS ,

( If you have an XF86Config-4 already there, delete it -- Knoppix genereates a custom file at runtime )

Copy the font files there,
and update the Knoppix /etc/X11/XF86Config-4.in file to reflect their paths.

FontPath "/usr/share/fonts/latex-ttf-fonts"
FontPath "/usr/share/fonts/ttf"
FontPath "/usr/share/fonts/ttf/cjk"
FontPath "/usr/share/fonts/microsoft"
FontPath "/usr/share/fonts/truetype/freefont"
FontPath "/usr/share/fonts/truetype/latex-xft-fonts"
FontPath "/usr/share/fonts/truetype/arphic"
FontPath "/usr/share/fonts/truetype/larabie-deco"
FontPath "/usr/share/fonts/truetype/kochi"
FontPath "/usr/share/fonts/truetype/ttf-xfree86-nonfree-syriac"
FontPath "/usr/share/fonts/truetype/larabie-straight"
FontPath "/usr/share/fonts/truetype/larabie-uncommon"
FontPath "/usr/share/fonts/truetype/mikachan"
FontPath "/usr/share/fonts/truetype/ttf-xfree86-nonfree"
FontPath "/usr/share/fonts/truetype/arhangai"
FontPath "/usr/share/fonts/truetype/alee"
FontPath "/usr/share/fonts/truetype/ttf-indic-fonts"
FontPath "/usr/share/fonts/truetype/baekmuk"
FontPath "/usr/share/fonts/truetype/dustin"
FontPath "/usr/share/fonts/truetype/ttf-isabella"
FontPath "/usr/share/fonts/truetype/unfonts"
FontPath "/usr/share/fonts/afms"
FontPath "/usr/share/fonts/afms/adobe"
FontPath "/usr/share/fonts/latex-ttf-fonts"
FontPath "/usr/share/fonts/type1"
FontPath "/usr/share/fonts/type1/gsfonts"
FontPath "/usr/share/fonts/type1/t1-xfree86-nonfree"
FontPath "/usr/share/fonts/freefonts"
FontPath "/usr/share/fonts/jfbterm"
FontPath "/usr/share/fonts/kon"
FontPath "/usr/share/fonts/hp"
FontPath "/usr/share/fonts/cmap"
FontPath "/usr/share/fonts/cmap/adobe-japan1"
FontPath "/usr/share/fonts/cmap/adobe-cns1"
FontPath "/usr/share/fonts/cmap/adobe-gb1"
FontPath "/usr/share/fonts/cmap/adobe-japan2"
FontPath "/usr/share/fonts/cmap/adobe-korea1"
FontPath "/usr/X11R6/lib/X11/fonts/defoma/CID"
FontPath "/usr/X11R6/lib/X11/fonts/defoma/TrueType"
FontPath "/usr/share/fonts/MSPUBLISHERFONTS"

Then run this script to register the fonts - I found this in part of a recent script by Dr. Klaus Knopper -



#!/bin/bash

######## Add the paths to your fonts within the quotes below ##############

TTFFONTS="/usr/share/fonts/latex-ttf-fonts /usr/share/fonts/ttf /usr/share/fonts/ttf/cjk /usr/share/fonts/microsoft /usr/share/fonts/truetype/freefont /usr/share/fonts/truetype/latex-xft-fonts /usr/share/fonts/truetype/arphic /usr/share/fonts/truetype/larabie-deco /usr/share/fonts/truetype/kochi /usr/share/fonts/truetype/ttf-xfree86-nonfree-syriac /usr/share/fonts/truetype/larabie-straight /usr/share/fonts/truetype/larabie-uncommon /usr/share/fonts/truetype/mikachan /usr/share/fonts/truetype/ttf-xfree86-nonfree /usr/share/fonts/truetype/arhangai /usr/share/fonts/truetype/alee /usr/share/fonts/truetype/ttf-indic-fonts /usr/share/fonts/truetype/baekmuk /usr/share/fonts/truetype/dustin /usr/share/fonts/truetype/ttf-isabella /usr/share/fonts/truetype/unfonts /usr/share/fonts/afms /usr/share/fonts/afms/adobe /usr/share/fonts/latex-ttf-fonts /usr/share/fonts/type1 /usr/share/fonts/type1/gsfonts /usr/share/fonts/type1/t1-xfree86-nonfree /usr/share/fonts/freefonts /usr/share/fonts/jfbterm /usr/share/fonts/kon /usr/share/fonts/hp /usr/share/fonts/cmap /usr/share/fonts/cmap/adobe-japan1 /usr/share/fonts/cmap/adobe-cns1 /usr/share/fonts/cmap/adobe-gb1 /usr/share/fonts/cmap/adobe-japan2 /usr/share/fonts/cmap/adobe-korea1/usr/share/fonts/MSPUBLISHERFONTS"

XFONTS="/usr/X11R6/lib/X11/fonts/misc /usr/X11R6/lib/X11/fonts/75dpi /usr/X11R6/lib/X11/fonts/100dpi /usr/X11R6/lib/X11/fonts/Speedo /usr/X11R6/lib/X11/fonts/PEX /usr/X11R6/lib/X11/fonts/cyrillic /usr/X11R6/lib/X11/fonts/latin2/75dpi /usr/X11R6/lib/X11/fonts/latin2/100dpi /usr/X11R6/lib/X11/fonts/Type1"

################################################## ##############

# Euro font stuff
perl -pi -e 's/iso8859-1( |$)/iso8859-15$1/g' /etc/X11/fonts/*/*.alias

for i in $TTFFONTS; do
[ -d "$i" ] && ( cd $i ; rm -f fonts.cache-1 fonts.scale; mkttfdir )
done

for i in $XFONTS; do
[ -d "$i" ] && ( cd $i ; rm -f fonts.cache-1; mkfontdir; mkfontscale )
done

HOME=/root fc-cache -f -v
install -m 644 /root/.fonts.cache-1 /usr/share/knoppix/profile/.fonts.cache-1

# LaTeX
mkfontdesc

# Copy fontcache, if present
[ -f /home/knoppix/.fonts.cache-1 ] && \cp -afv /home/knoppix/.fonts.cache-1 /usr/share/knoppix/profile/

# Remove broken japanese fonts in Debian
find /usr/X11R6/lib/X11/fonts -iname \*ja.\* -exec rm -fv {} \;

# && update-fonts-alias /usr/X11R6/lib/X11/fonts/misc
echo "In case you updated nessus >= 2.0, please run nessusd once, to create the /usr/lib/nessus/plugins/.desc directory."
[/code][/b]