[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#166335: xlibs: XFT default configuration really terrible Tag; patch



Package: xlibs
Version: 4.2.1-3
Severity: normal


Hi,

I have been investigation a few problems with Xft, and the first one is
the default configuration. Currently, if a font is unkown (and since
there is no Sans and Serif and Monospace fonts as used e.g. in Gnome2,
or no Helvetica anti-aliased and no fixed antialiased fonts, as used in
terminals or Gnumeric), the result is "the first listed font in the
list of all available fonts". Which is really really bad, for my first
font was Cartwright (try to use Cartwright size 12).

I dug a bit around, read the source code of libxft (partly), and found
a good way to ensure that fonts would be at least readable when the =

environment contains GDK_USE_XFT=3D1.

Principle: find reasonable defaults for all font requests.
Problem: no font is guaranteed to be present, so we have to put several
defaults.
Problem: Helvetica and Times are not defaults.
Answer: assume xfonts-scalable is there

Patch:
New /etc/X11/XftConfig
-----------------begin of file-----------------------------
# $XFree86: xc/lib/Xft/XftConfig.cpp,v 1.8 2001/11/21 23:41:12 keithp Exp $

dir "/usr/X11R6/lib/X11/fonts/Type1"
dir "/usr/X11R6/lib/X11/fonts/TrueType"

match any family =3D=3D "fixed"             edit family =3D+ "mono";
match any family =3D=3D "fixed"             edit spacing =3D+ 100;

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

#
# Alias between XLFD families and font file family name, prefer local
# fonts
#
match any family =3D=3D "charter"           edit family +=3D "bitstream cha=
rter";
match any family =3D=3D "bitstream charter" edit family =3D+ "charter";

# Propose reasonable defaults. Assume xfonts-scalable is there.
# First, monospace fonts
match any spacing =3D=3D 110 edit family =3D+ "Courier 10 Pitch" ;
match any spacing =3D=3D 100 edit family =3D+ "Courier 10 Pitch" ;
# Second, all others
match any spacing =3D=3D 0 edit family =3D+ "Bitstream Charter" ;
# Sometimes fonts are not requested with a specification for spacing,
# so the preceding pattern fails to add Bitstream Charter as an
# alternative. However, all are requested with a size (I hope).
# Propose several alternatives.
match any size > 0 edit
        family =3D+ "Helvetica" ;
        family =3D+ "Arial" ;
	family =3D+ "Bitstream Charter" ;
-------------------end of file-----------------------------

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux penpen 2.4.18jcd #1 ven jui 26 12:25:24 CEST 2002 i686
Locale: LANG=3Dfr_FR@euro, LC_CTYPE=3Dfr_FR@euro

Versions of packages xlibs depends on:
ii  libc6                         2.3.1-3    GNU C Library: Shared librarie=
s an
ii  libfreetype6                  2.1.2-10   FreeType 2 font engine, shared=
 lib
ii  xfree86-common                4.2.1-3    X Window System (XFree86) infr=
astr

-- no debconf information





Reply to: