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

List:       koffice
Subject:    Re: Ruler fonts wrong in KWord 1.2beta1
From:       David Faure <david () mandrakesoft ! com>
Date:       2002-04-30 6:32:45
[Download RAW message or body]

On Monday 29 April 2002 21:47, Ned Konz wrote:
> Hi,
> I don't know whether this is a better question for koffice-devel, but 
> here goes:
> 
> I have KDE 3.0.0 (from RPMs), and I just compiled KWord 1.2.beta1 from 
> the source RPMs. Although I have a Red Hat system and the SRPMs were 
> for Mandrake, the compile went well and I can run KWord.
> 
> However, when I start KWord, the font used for the numbers in the 
> rulers is (apparently) set to "Starbats [Xft]", so I see strange 
> symbols instead of the numbers 1, 2, 3, etc. that should be there.
> 
> If I pop down the font choice tab, and select the same font (which is 
> "Arial [Xft]" by default,), then the font will usually change to one 
> that has proper numbers.
> 
> However, if I then choose a font like Starbats in my text, the ruler 
> will change back to Starbats and will stay there, no matter whether I 
> change the text font later.
> 
> Other data points: The first time I started up KWord, the font was 
> Starbats everywhere. Then I set the default font to Arial in KWord 
> settings, and at least the text starts out right.

The problem of the font in the ruler is quite tricky.
The code currently says
QFont font = QFont( "helvetica", 8 ); // Ugh... hardcoded (Werner)
and Werner is right, this is quite bad ;)

I assume you don't have helvetica installed, so Qt picks another font
(supposed to be a lookalike, but that's theory).

The problem is that if we just use the global KDE font, which can be
set to anything, then size 8 might be too big, or too small.
I guess we need some iteration over sizes, using QFontMetrics, to find
out which font size would give the wanted pixel size.... but that's going to be
slow :(

Could you try with
QFont font;
font.setPointSize( 8 );
though? (this will use the global kde font).
Might be much better already,

koffice/lib/kofficeui/koRuler.cc, lines 166 and 320

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KDE, Making The Future of Computing Available Today


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

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