Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15
-
None
Description
When rendering a font with a very large font size, word spacing is not correctly applied and the characters will overlap.
The following script demonstrates the issue:
QImage im = QImage( 2000, 1500, QImage::Format_ARGB32 );
im.fill( Qt::transparent );
QPainter painter( &im );
QFont font;
font.setPointSizeF( 1600 );
painter.setFont( font );
painter.setPen( QPen( Qt::black ) );
painter.drawText( 0, 1500, "a test" );
painter.end();
QPixmap pm = QPixmap::fromImage( im );
QLabel label;
label.setPixmap( pm );
label.show();
At font size 1200 point the spacing is correct between the "a" and "t" characters, but at 1600 points the spacing gets mangled and the characters start to overlap