Since switching to QT 6.0.0 I got problems with QPdfWriter. Every Time I try to print a text, the embedded font couldn't get loaded from various pdf reader (even Adobe reader). I'm as well not getting any errors or anything else on the output.
QPdfWriter writer("C:/Users/GGG/Desktop/lol.pdf");
writer.setResolution(300);
writer.setPageSize(QPageSize(QPageSize::A4));
writer.newPage();
QPainter painter;
painter.begin(&writer);
painter.drawText(600,600,"Hello, this is a test");
painter.end();
My attempts:
db.hasFamily("Calibri");
(return value = true)MinGW 8.1.0 64Bit
, Sources
, Qt 5 compatibility Module
, Qt Shader Tools
, Qt Debug Information Files
.Still no clue what could cause this behavior. Does anyone got the same fault or has a solution?
Information about my system:
Windows 10, 64bit - used fonts are installed
Qt creator 4.14.0 - MinGW64 with Qt 6.0.0
Finally, after research on other forums like forum.qt.io I found out it might be a bug. There's alredy a bugreport open -> https://bugreports.qt.io/browse/QTBUG-89727
edit: Turned out it was a bug - wich is fixed now. As the bugfixer wrote:
Very nice and subtle bug - the container size was changed from int32_t to int64_t and the font serialization simply used QByteArray::size() without a cast.
Bugfix here: https://codereview.qt-project.org/c/qt/qtbase/+/329442