Adding KFontUtils to kdeui

Christoph Feck christoph at maxiom.de
Mon Jan 3 20:03:44 GMT 2011


I was asked to restate my position on this thread.

1. The namespace should be named KFontUtils as was the original intention. 
This is in line with KColorUtils and avoids the confusion with QFontMetrics. I 
suggest to move it to kdeui/fonts/kfontutils.{cpp|h}.

2. I share Parkers concern that passing a QPainter to the function is wrong. 
The reason given was that Qt has a bug where creating a QFont or 
QFontMetrics object for a specific paint device does not yield the same 
metrics as when using a QPainter for that paint device (bug number?). Qt bugs 
should not be reflected in the design decisions of an API. I don't have the 
patch at hand right now to check which name we used, but I suggest the 
signature to be KFontUtils::maxPointSizeF(const QFont &font, const QSizeF 
&size, const QString &text).

Christoph Feck (kdepepo)

On Saturday 01 January 2011 20:31:55 Albert Astals Cid wrote:
> A Dimarts, 28 de desembre de 2010, Jeremy Whiting va escriure:
> > Albert Astals Cid <aacid <at> kde.org> writes:
> > > > > 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.
> > > 
> > > Well, i've done all you both have suggested, so don't know what more
> > > you want.
> > > 
> > > Anyway, let's stop this, makes no sense keep discussing for something
> > > that maybe we'll never ship.
> > > 
> > > Albert
> > > 
> > > > > Albert
> > 
> > Christoph, Albert, Others,
> > 
> > I'd like to see this happen in the 4.7 timeframe (sooner than later)
> > especially because it will help kdeedu/libkdeedu/kdeeduui disappear,
> > which removes a dependency of a couple of kdeedu applications prior to
> > the migration to git.
> > 
> > Thoughts about the last patches sent by Albert? otherwise I suggest we
> > move this class into kdelibs/kdeui where all kde applications can
> > benefit from it.
> 
> I'm all for it, not sure if i fixed all of Christoph and Parker concerns
> though.
> 
> Albert
> 
> > Best Regards,
> > Jeremy




More information about the kde-core-devel mailing list