[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Multihead support for KDE 2.1
From:       Bradley T Hughes <bhughes () trolltech ! com>
Date:       2001-02-05 17:37:44
[Download RAW message or body]

On Monday 05 February 2001 18:28, Keith Packard wrote:
> This patch makes KDE dependent on Qt using core X fonts; I've a server that
> has only two core X fonts (fixed and cursor) but Qt provides over 4000
> TrueType and Type1 scalable faces via Xft in my environment.  Is there a
> problem in Qt that requires this change?  Can we get a fix into Qt instead?
>
> keithp@keithp.com	 XFree86 Core Team		SuSE, Inc.
>
>
> RCS file: /home/kde/kdelibs/kdeui/kfontdialog.cpp,v
> retrieving revision 1.59
> diff -u -b -r1.59 kfontdialog.cpp
> --- kdeui/kfontdialog.cpp	2001/01/31 19:15:20	1.59
> +++ kdeui/kfontdialog.cpp	2001/02/05 17:15:26
> @@ -409,6 +409,23 @@
>    if (fixed)
>    {
>      QStringList lstFixed;
> +
> +#if QT_VERSION >= 224
> +    // the font dialog shouldn't open every font on the system just to get
> a list of +    // fixed point fonts
> +    const char *pattern = "-*-*-*-*-*-*-*-*-*-*-*-*-*-*";
> +    int fontcount = 0;
> +    char **fontlist = XListFonts(qt_xdisplay(), pattern, 32768,
> &fontcount); +
> +    QFont font;
> +    if (fontlist) {
> +	for (int i = 0; i < fontcount; i++) {
> +	    font.setRawName(fontlist[i]);
> +	    if (font.fixedPitch() && ! lstFixed.contains(font.family()))
> +		lstFixed.append(font.family());
> +	}
> +    }
> +#else
>      for (QStringList::Iterator it = lstSys.begin(); it != lstSys.end();
> ++it) {
>          // To get the fixed with info (known as fixed pitch in Qt), we
> @@ -421,6 +438,7 @@

Err, this made it in by mistake.  The reason for this particular patch is 
because the KFontDialog tries to open *every* font on the system to determine 
if it is a fixed pitched font or not.  I might be able to make Qt do this, 
but I did the quick and dirty fix so that I didn't have to wait 30 seconds to 
a minute while the X server rendered all of my true type fonts (especially my 
arial unicode font, which is 24mb alone).

-- 
--
Bradley T. Hughes <bhughes@trolltech.com>
Trolltech AS - Waldemar Thranes gt. 98B N-0175 Oslo, Norway
Office: +47 21604892
Mobile: +47 92019781

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic