[
https://issues.apache.org/jira/browse/PDFBOX-6324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr updated PDFBOX-6324:
------------------------------------
Description:
>From Claude:
h3. Bug: wrong operand in the {{b}} component (line 736)
java
{{matrixDest.set(1, a1 * b2 + b1 * d1); // wrong
matrixDest.set(1, a1 * b2 + b1 * d2); // correct}}
For the row-vector product {{{}M1 × M2{}}}, {{{}b = a1·b2 + b1·d2{}}}. The code
uses {{d1}} instead of {{{}d2{}}}, while the neighbouring line 738 ({{{}c1*b2 +
d1*d2{}}}) correctly uses {{{}d2{}}}.
This is latent: nearly all real FontMatrices are {{{}[0.001 0 0 0.001 0 0]{}}},
so {{b1 == 0}} and the wrong term vanishes. It only produces wrong output when
the top-dict matrix has a non-zero {{b}} (skewed or rotated fonts) and the two
matrices’ {{d}} values differ.
> Bug in CFFParser.concatenateMatrix()
> ------------------------------------
>
> Key: PDFBOX-6324
> URL: https://issues.apache.org/jira/browse/PDFBOX-6324
> Project: PDFBox
> Issue Type: Sub-task
> Components: FontBox
> Affects Versions: 2.0.37, 3.0.8 PDFBox
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Priority: Trivial
> Fix For: 2.0.38, 3.0.9 PDFBox, 4.0.0
>
>
> From Claude:
> h3. Bug: wrong operand in the {{b}} component (line 736)
>
> java
> {{matrixDest.set(1, a1 * b2 + b1 * d1); // wrong
> matrixDest.set(1, a1 * b2 + b1 * d2); // correct}}
> For the row-vector product {{{}M1 × M2{}}}, {{{}b = a1·b2 + b1·d2{}}}. The
> code uses {{d1}} instead of {{{}d2{}}}, while the neighbouring line 738
> ({{{}c1*b2 + d1*d2{}}}) correctly uses {{{}d2{}}}.
> This is latent: nearly all real FontMatrices are {{{}[0.001 0 0 0.001 0
> 0]{}}}, so {{b1 == 0}} and the wrong term vanishes. It only produces wrong
> output when the top-dict matrix has a non-zero {{b}} (skewed or rotated
> fonts) and the two matrices’ {{d}} values differ.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]