Thanks for your reply. This makes sense. But in this case shouldn't font drawing also draw at the same size (i.e. 28 pixels high on Linux, 27 pixels high on Windows)?
-- Yours sincerely, George Tasopoulos On 29 December 2013 17:36, Christoph Feck <christ...@maxiom.de> wrote: > On Sunday 29 December 2013 18:16:29 George Tasopoulos wrote: > > QFont font("Liberation Mono", 18, QFont::Normal, false); > > QFontMetrics metrics(font); > > int x = metrics.height(); > > > > On Windows x equals 27, which seems to be the correct value, but on > > Linux it equals 28. > > The (pixel) height of the font is determined by DPI of the display, so > it is correct that on different systems you get different results for > the font metrics. After all, that's the reason the QFontMetrics class > is provided, so that you can adapt to the resulting metrics. > > -- > Christoph Feck > http://kdepepo.wordpress.com/ > KDE Quality Team > openSUSE Review Team >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest