mirror of
https://github.com/tumic0/QtPBFImagePlugin.git
synced 2024-11-24 03:35:54 +01:00
Removed obscure font em computation
This commit is contained in:
parent
ac7a56441a
commit
9bf28563fa
@ -9,7 +9,7 @@ TextItem::TextItem(const QString &text, const QPointF &pos, const QFont &font,
|
||||
_font(font)
|
||||
{
|
||||
QFontMetrics fm(font);
|
||||
int limit = fm.width('M') * maxTextWidth;
|
||||
int limit = font.pixelSize() * maxTextWidth;
|
||||
|
||||
QRect br = fm.boundingRect(QRect(0, 0, limit, 0), FLAGS, text);
|
||||
Q_ASSERT(br.isValid());
|
||||
|
Loading…
Reference in New Issue
Block a user