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

List:       koffice-devel
Subject:    fonts
From:       Thomas Zander <zander () planescape ! com>
Date:       2001-11-18 20:30:40
[Download RAW message or body]

Hi, I spent the better part of my sunday working with fonts. I am afraid I did
not fix the bugs we have been seeing with too small fonts in KWord, but I do 
think I found the cause to the problems we had. Here are my results;

I have the odd behavior that starting KWord (any program actually) from kicker
I get different fonts then when starting from a konsole. (anyone else seeing this?)
This probably has to do with the fact that QT is loaded and never unloaded in 
the kicker session; so something goes wrong when I start another KWord, which 
uses another QT instance. (what do you mean; shared libs...)
When starting with "kdeinit kword" it replaces the kicker version with an 
incorrect version as well.

Anyway; starting KWord from kicker I get
QFontLoader: getting font name for family Helvetica
QFontLoader: putting '-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso10646-1' \
(60) into name dict QFont::load: using name \
'-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso10646-1'

starting from konsole I get:
QFontLoader: getting font name for family Helvetica
QFontLoader: putting 'Nimbus Sans \
L-10:style=Regular:slant=0:weight=100:pixelsize=13.8798:encoding=iso10646-1:core=False \
:antialias=True:index=0:outline=True:scalable=True:rgba=2:render=True:minspace=False' \
(182) into name dict

This naturally is the first problem; and I have absolutely no idea why this 
is different.

Point is; the top one is a bitmap and the bottom one is a vector font. The bitmapped
font is actually giving the problems with the very small, unreadable fonts...


QTRT asks the width of a character, this call reaches the following method in
the end;
    src/kernel/qfont_x11.cpp method int QFontMetrics::width(QChar ch) const

In the case of the vector font a normal 'd' returns the width of 155, this 
surprised me until I realized this is probable the zoomed 1440dpi version.
In the case of the bitmap font it returns 10...

Ok, I thought that means there is a bug in QT! Well, Perhaps not; the
bitmapped fonts on my system are served by X. The appropriate lines in my 
XFConfig are similar to
        FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
And that :unscaled at the end is our buglet; it means that X will never ever
scale the bitmapped fonts in that directory, so requesting a 100 pt font will 
return the largest bitmapped font, something like 24pt for example..
I removed the :unscaled and now I have removed the problem of tiny little fonts
in KWord.

It would be nice if we could tell QT that we don't want a bitmapped font, even
if that means that another family will be used for the font. It would also be
nice if we got a nice dialog in KWord telling the user that the default font
(Helvetica) is not available.

I hope others can use this info to write an actual fix, as I won't have too much
time left for that...

-- 
Thomas Zander                                            zander@earthling.net
The only thing worse than failure is the fear of trying something new


[Attachment #3 (application/pgp-signature)]
_______________________________________________
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