Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12.10, 5.15.2, 6.0.1
-
None
Description
For some fonts with sub glyphs, the QFontEngineFT::getUnscaledGlyph may get unwanted metrics for some glyphs, this cause text overlapped when printing on Linux platform.
See the below code for example:
QFont font("DFKai-SB", 32); painter.setFont(font); QRect rect(0, 0, dev->width(), dev->height()); painter.drawText(rect, Qt::AlignCenter, QString::fromUtf16(u"校園"));
When printing or uses QPdfWriter as QPaintDevice, the 校園 overlapped.
I have no idea how to fix the FT_Load_Glyph(face, glyph, FT_LOAD_NO_BITMAP) called in QFontEngineFT::getUnscaledGlyph.
If you use fontforge open the pdf file, you will see the "園" position not place center compare on the origin font.