Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.15.0 RC2
-
None
-
Linux/Debian 64bit
Description
In Linux/Debian drawing text with font "tiaofuheiti.ttf"(already uploaded) , find QFontMetrics.height always is 1px.
Following code, can get correct font height.
QTextDocument doc(QStringLiteral("1")); doc.setDocumentMargin(0); doc.setDefaultFont(font()); doc.adjustSize(); int fontHeight = doc.size().height();
It looks like is a qt's bug why QFontMetrics.height cannot get correct height.
Please check that issue.
Thank u in advance.