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

List:       kde-core-devel
Subject:    KFontChooser problem (was: Re: Commited the configuredialog patch.)
From:       Marc Mutz <Marc.Mutz () uni-bielefeld ! de>
Date:       2001-12-02 17:57:17
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[core-devel: we're talking about a bug in the profile management of 
KMail's configuredialog, where only some fonts get applied and others 
don't. It turned out to be the problem of how to feed a "default font", 
read from a config file, into KFontChooser without risking 
KFontChooser's not applying it when it doesn't find it in it's family 
listbox]

On Sunday 02 December 2001 02:13, Marc Mutz wrote:
<snip>
> The profile management works _in principle_, ie. it applies some 
> options, but doesn't apply others. I currently don't know whether 
> that comes from the handwritten config files in kmail/profile or from
> individual installprofile(KConfig*) methods or from a dialog-global
> bug. At least the checkboxes and _some_ fonts (all but body and quote
> fonts) are applied.
<snip>

OK. I tracked it down:
1. I wrote "Helvetica,<some numbers>" into the config files.
2. They're correctly read as you can see from the debug output and thus 
they make their way into mFont[].
3. BUT: When calling KFontChooser::setFont(), KFontChooser searches it's 
family listbox for the string selFont.family(). Here, it doesn't 
contain "Helvetica", only
"Helvetica Narrow"
"Helvetica [Adobe]"
"Helvetica [Mdk]"
"Helvetica [Urw]"
So the font isn't changed in the fontchooser.

Two things:
1. one could introduce another pass of over the list box, this time with 
.find() or .startsWith(), but for me this would select "Helvetica 
Narrow", which isn't exactly what I'd call Helvetiva...
But still this only solves part of the problem, whose core is:
2. How does one write a "default font" into a config file, ie. one that 
is guaranteed to be available on all platforms?

Marc

- -- 
If this were a dictatorship, it'd be a heck of a lot easier...just as
long as I'm the dictator...
- -- George W. Bush, Washington, DC, Dec 18, 2000,
   during his first trip to Washington as President-Elect
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8CojV3oWD+L2/6DgRAtUJAKDnzul5IIx6Wt/t3cOikKeeS2xdLwCfXjN8
rLd+cwf2y0hK8ZkM2z2Oq6A=
=Gmh4
-----END PGP SIGNATURE-----

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

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