[Interest] Font measuring inconsistency between platforms in Qt5? Or, how best to draw characters with QPainter.

George Tasopoulos tasopoulos.yorghos at gmail.com
Sun Dec 29 21:56:42 CET 2013

(This message will probably not appear in the right place in the thread)

> >* 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)?
> Only if both computers have the same DPI for the screen and the same font
> rendering engines. Do you even have the Liberation Mono font installed on both
> systems?

I didn't explain that well enough: I don't mind if the size in one system
isn't the same as the size in another system, what I want is to make sure
there are no gaps between two rows of characters.
Currently, in my Windows system the height is reported to be 27 and the
characters are (apparently) drawn to be 27 pixels high, which is good, but
in my Linux system the height is reported to be 28 and the characters are
(apparently) NOT 28 pixels high, which is a problem.

The font is installed in both systems and I also did a binary comparison
between their font files. They're identical.

Yours sincerely,
George Tasopoulos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131229/2f93a65c/attachment.html>

More information about the Interest mailing list