LibPDF: Mark text rendering matrix dirty after changing it in text_begin

A certain PDF was drawing some text used `9 0 0 9 474.54 700.6801 Tm`
to set the text matrix to a matrix that scaled by 9 in one text object.

Then, after ending that text object, it had the following new text
object which contained nothing that invalidated the text matrix:

```
BT
/F1 7 Tf
/DeviceRGB CS
0 0 0 SC
10 TL
86.37849 21.908 Td
(Authorized licensed use limited to: ...) Tj
ET
```

`BT` did reset it as required, but since we didn't mark the matrix
as dirty, we never recomputed it and drew the additional text scaled
up 9x.
This commit is contained in:
Nico Weber 2024-01-10 09:45:23 -05:00 committed by Andreas Kling
parent 5af02a914c
commit df5451a889
Notes: sideshowbarker 2024-07-17 05:41:34 +09:00

View file

@ -416,6 +416,7 @@ RENDERER_HANDLER(text_begin)
{
m_text_matrix = Gfx::AffineTransform();
m_text_line_matrix = Gfx::AffineTransform();
m_text_rendering_matrix_is_dirty = true;
return {};
}