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

List:       koffice-devel
Subject:    Re: [BUG] KWord display text much too small
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-10-02 0:03:07
[Download RAW message or body]

On Mardi 2 Octobre 2001 01:51, Dirk Mueller wrote:
> On Mon, 01 Okt 2001, David Faure wrote:
> 
> > OK, that's the "QFont::pointSize() returns -1 when setting a pixelsize" issue,
> > which I already mentionned, and which needs a fix in KConfig or in KGlobalSettings.
> > I suggested a simple fix but Dirk mentionned a bigger cleanup needed...
> 
> well, the QFontInfo fix would be okay imho. or should we save 
> both now?

I think we should save the QFont object as exactly as possible.
I see two solutions for that, either saving the "request" as it was made
(i.e. pointsize OR pixelsize depending on how the QFont object was created),
or saving the result of that request, i.e. the QFontInfo.

> if we break config reading compatibility this would be right then 
> IMHO, better than the QFontInfo "hack".

So, compat concerns aside, you think it would be best to save the QFont
object rather than the QFontInfo one ? In that case, here's an idea on how
to do it w/o breaking compat: we could save either point size or pixel size,
depending on the one used in this QFont, and append a bool to the key, that
is e.g. true for pixel sizes. Entries without this bool will be read as "the number
is a point size", as it was before.

>  The drawback of the latter is that 
> the chosen font might change if you change your font setup between 
> application starts/savings. 

That's the drawback of saving the QFont, you mean ?
Well, saving a "result" (QFontInfo), and deinstalling that font, can lead to
pretty strange results too, no ?

> This might be undesireable or even fatal (i.e. broken formatting in kword).  
Oh, don't be mistaken, KWord doesn't use KConfig to save formatting ;-))) 
It only uses KConfig via KGlobalSettings::generalFont(), when setting the
default font on an empty document, nothing else ;)
(So, no big worries here about KWord, as long as it doesn't get a size of -1 ;-)

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
_______________________________________________
Koffice-devel mailing list
Koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel

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

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