serenity/Tests/LibPDF
Nico Weber 9a93f677f4 LibPDF: Mark text rendering matrix as dirty after TJ numbers
Mostly because I audited all places that assigned to `m_text_matrix`
after #22760.

This one is very difficult to trigger in practice.

`show_text()` marks the text rendering matrix dirty already,
so this only has an effect if the `TJ` array starts with a
number, and the matrix isn't marked dirty going in.

`Tm` caches the text rendering matrix, so I changed text.pdf
to contain:

```
1 0 0 1 45 130 Tm
[ 200 (Hello) -2000 (World) ] TJ T*
```

This first sets an x offset of 5 (on top of the normal 40), and
then undoes it (`200` is multiplied by font size (25) / -1000,
and `200 * 25 / -1000` is -5). Before this change, the topmost
"Hello World" ended up slightly indented.

Likely no behavior change in practice, but makes the code easier
to understand, and maybe it helps in the wild somewhere.
2024-01-15 08:39:04 +00:00
..
CMakeLists.txt Tests: Add a PDF rendering test 2023-12-20 12:45:07 +01:00
colorspaces.pdf Tests: Add a pdf file for testing color spaces 2023-11-04 17:02:37 -04:00
complex.pdf Tests: Move test PDF files into Tests/LibPDF 2023-01-19 11:50:10 +00:00
encoding.pdf LibPDF: Add (automated!) test for outline encoding 2023-11-22 09:08:06 -07:00
encryption_nocopy.pdf LibPDF: Make encrypted object streams work 2023-07-12 17:16:25 +02:00
linearized.pdf Tests: Move test PDF files into Tests/LibPDF 2023-01-19 11:50:10 +00:00
non-linearized.pdf Tests: Move test PDF files into Tests/LibPDF 2023-01-19 11:50:10 +00:00
oss-fuzz-testcase-62065.pdf LibPDF: Don't use unsanitized values in error messages 2023-10-26 11:05:32 +02:00
password-is-sup.pdf Tests/LibPDF: Add test for AES-encrypted PDF 2023-07-12 06:28:15 +02:00
pattern.pdf Tests: Add a test for LibPDF pattern rendering 2023-12-10 16:44:24 +01:00
standard-14-fonts.pdf Tests/LibPDF: Add a PDF using the standard 14 fonts 2024-01-03 10:19:24 +01:00
TestPDF.cpp LibPDF: Improve hex string parsing 2024-01-02 22:13:21 +01:00
text.pdf LibPDF: Mark text rendering matrix as dirty after TJ numbers 2024-01-15 08:39:04 +00:00
type1.pdf Tests: Move test PDF files into Tests/LibPDF 2023-01-19 11:50:10 +00:00
type3.pdf Tests: Add a type3 test pdf 2023-11-19 22:33:34 +01:00
wide-gamut-only.pdf Tests: Add a pdf that embeds a wide-gamut 16-bits/channel image 2024-01-12 16:20:46 -07:00