The XftConfig file included in XFree86-4.0.3-1mdk is still the default
one by Keith Packard. It does not work properly with Mandrake Cooker
because it refers to the Microsoft Web Fonts, which are not part
of the distribution. It works as intended only when the user installes
the fonts from Keith's home page or manually (not through drakfont)
from some other operating system to /usr/X11R6/lib/X11/fonts/truetype.

I edited the file to search all common font directories (including
DrakFont, most importantly) in Mandrake and to find the best possible
replacement for the MS truetype fonts when they are not installed (based
on replacement lists of font names).

I have tested all sorts of configurations with the different font RPMS
from Mandrake installed or not installed and got acceptable results all the
time, never worse than the original XftConfig.

I hope I documented my additions well enough so you can leave out anything
you don't like.

Can you please include this file (or an edited version) in the next 
compile of XFree86? Thanks.

Arnd Bergmann <><
#
# XftConfig
#
# Use with Type1 and TrueType fonts
# 

# Note that each application scans all these directories
# during startup, so you may want to disable some to
# get better speed.

# Standard XFree86 Type 1 fonts
dir "/usr/X11R6/lib/X11/fonts/Type1"
# Default location for Microsoft Web Fonts
dir "/usr/X11R6/lib/X11/fonts/truetype"
# URW fonts
dir "/usr/share/fonts/default/Type1"
# Localized Truetype fonts
dir "/usr/share/fonts/ttf/armenian"
dir "/usr/share/fonts/ttf/big5"
dir "/usr/share/fonts/ttf/decoratives"
dir "/usr/share/fonts/ttf/gb2312"
dir "/usr/share/fonts/ttf/japanese"
dir "/usr/share/fonts/ttf/korean"
dir "/usr/share/fonts/ttf/western"
# Sun JDK fonts
dir "/usr/java/jdk1.3/jre/lib/fonts"
# Sun OpenOffice, location depends on install
dir "/usr/openoffice60/share/fonts/type1"
dir "/usr/local/openoffice60/share/fonts/type1"
dir "~/openoffice60/share/fonts/type1"
# OpenOffice fonts from ttfonts*rpm in RH7
dir "/usr/share/fonts/default/TrueType"
# AbiSuite comes with URW fonts as well
dir "/usr/share/abisuite/AbiSuite/fonts"
# User installed fonts
dir "/usr/X11R6/lib/X11/fonts/drakfont"

#
# alias 'fixed' for 'mono'
#
match any family == "fixed"             edit family =+ "mono";

#
# Check users config file
#
includeif       "~/.xftconfig"

#
# Substitute TrueType fonts for Type1 versions
#
match any family == "Times"             edit family += "Times New Roman";
match any family == "Helvetica"         edit family += "Verdana";
match any family == "Courier"           edit family += "Courier New";

#
# Use TrueType fonts for defaults
#
match any family == "serif"             edit family += "Times New Roman";
match any family == "sans"              edit family += "Verdana";

#
# Use monotype.com (andale) face where possible
#
match 
        any family == "mono" 
        all slant == roman 
        all weight < bold
edit
        family += "monotype.com";
#
# otherwise, use courier
#
match any family == "mono"              edit family += "Courier New";
match any family == "mono"              edit family += "Courier";

#
# Alias between XLFD families and font file family name, prefer local fonts
#
match any family == "Charter"           edit family += "Bitstream Charter";
match any family == "Bitstream Charter" edit family =+ "Charter";

match any family == "Lucidux Serif"     edit family += "LuciduxSerif";
match any family == "LuciduxSerif"      edit family =+ "Lucidux Serif";

match any family == "Lucidux Sans"      edit family += "LuciduxSans";
match any family == "LuciduxSans"       edit family =+ "Lucidux Sans";

match any family == "Lucidux Mono"      edit family += "LuciduxMono";
match any family == "LuciduxMono"       edit family =+ "Lucidux Mono";
    
#
# TrueType font aliases
#
match any family == "Comic Sans"        edit family += "Comic Sans MS";
match any family == "Comic Sans MS"     edit family =+ "Comic Sans";
match any family == "Trebuchet"         edit family += "Trebuchet MS";
match any family == "Trebuchet MS"      edit family =+ "Trebuchet";
match any family == "Monotype"          edit family =+ "Monotype.com";
match any family == "Andale Mono"       edit family += "Monotype.com";
match any family == "Monotype.com"      edit family =+ "Andale Mono";

#
# If the Microsoft Web Fonts are not installed, we have to find a 
# replacement
#

# these come with Sun JDK 1.3
match any family == "Verdana"           edit family += "Lucida Sans";
match any family == "Times New Roman"   edit family += "Lucida Bright";
match any family == "Courier New"       edit family += "Lucida Sans Typewriter";

# OpenOffice 6
match any family == "Verdana"           edit family += "Lucida Sans Tur";
match any family == "Times New Roman"   edit family += "Lucida Bright Tur";
match any family == "Courier New"       edit family += "Lucida Sans Typewriter Tur";

# ttfonts from RH7
match any family == "Verdana"           edit family += "Helmet";

# URW fonts 
match any family == "Verdana"           edit family += "Nimbus Sans L";
match any family == "Times New Roman"   edit family += "Nimbus Roman No9 L";
match any family == "Courier New"       edit family += "Nimbus Mono L";

# western fonts
match any family == "Verdana"           edit family += "Blue Highway";

# XFree86 default fonts
match any family == "Verdana"           edit family += "LuciduxSans";
match any family == "Times New Roman"   edit family += "LuciduxSerif";

Reply via email to