Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.6.0
-
None
Description
Since https://codereview.qt-project.org/#/q/Ie93b0f4a56775729105a375ba3bcdb5b58993433,n,z (Qt 5.4), the PDF engine outputs miter limit for Qt::SvgMiterJoin and Qt::MiterJoin. The PDF miter limit concept is the SVG one, not the Qt one. For miter limiting to trigger on the same angle, Qt::MiterJoin miter limits need to be transformed by qSqrt(1.0 + miter_limit * miter_limit * 4).
Even worse, while the PDF 1.4 spec claims that numeric values such as miter limits "are forced into valid range, if necessary", this is not the case with Adobe Reader DC. 0.5 is a valid value for a Qt::MiterJoin miter limit. But when it ends up in a PDF, it causes the file to be displayed with warnings and incompletely in Adobe Reader. It seems that the value needs to be at least 1.0 (i.e. one line width), which make sense given its interpretation, and which is ensured by above formula.