Adding KFontUtils to kdeui

Christoph Feck christoph at maxiom.de
Mon May 4 20:31:09 BST 2009


Am Monday 04 May 2009 20:29:07 schrieb Albert Astals Cid:
> A Dilluns, 4 de maig de 2009, Christoph Feck va escriure:
> > KFontMetrics sounds like it is a subclass of QFontMetrics, not sure if it
> > is wise to use this name...
>
> You mean like KColorDialog, KShortcut, KButtonGroup, KMessageBox,
> KPixmapCache, etc?

No, I mean namespace vs. (sub)class.

> > Am Saturday 02 May 2009 15:50:02 schrieb Albert Astals Cid:
> > > The QPainter is needed because from what my experience show rendering
> > > on a QPrinter yields different results than rendering on a QImage.
> > >
> > > Also it's not on QFontMetrics because AFAIR QFontMetrics works on
> > > QFonts only so it can't have that knowledge.
> >
> > You can create a font metrics object suited for any device using the
> > correct constructor.
>
> No, the QFontMetrics constructor that accepts a QPaintDevice does not
> render on the device so the results are still just a guess, not the real
> thing.

Erm, that either sounds like a Qt bug, or I haven't understood the 
description. Of course it does not render, but the metrics is supposed to be 
the same as if you render on that device.

> Anyway it's obvious i'm too late on this, let's just wait for KDE 4.4

Maybe. I do not think I am in the position to stop you :) I have to agree with 
Parker that the current suggested patch does not feel "Qt way", though.

> Albert
>
> > Christoph Feck (kdepepo)




More information about the kde-core-devel mailing list