1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00
serenity/Userland/Libraries/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
..
Fonts Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
CMakeLists.txt LibPDF: Add some scaffolding for type 3 fonts 2023-11-17 19:47:53 +00:00
ColorSpace.cpp LibPDF: Move ColorSpace::style() to take ReadonlySpan<float> 2024-01-12 12:37:56 +00:00
ColorSpace.h LibPDF: Move ColorSpace::style() to take ReadonlySpan<float> 2024-01-12 12:37:56 +00:00
CommonNames.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
CommonNames.h LibPDF: Show a 'rendering unsupported' error for images with /Mask key 2023-12-23 20:39:11 +01:00
Document.cpp LibPDF: Scan for PDF file start in first 1024 bytes 2024-01-03 10:12:35 +01:00
Document.h LibPDF: Draw inline images 2023-12-20 12:45:16 -07:00
DocumentParser.cpp LibPDF: Port 59b50fa43f8c2 to xref and object streams 2024-01-04 11:27:24 +01:00
DocumentParser.h LibPDF: Scan for PDF file start in first 1024 bytes 2024-01-03 10:12:35 +01:00
Encoding.cpp LibPDF: Add a FIXME and a spec comment to Encoding::from_object() 2024-01-04 10:12:11 +01:00
Encoding.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Encryption.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Encryption.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Error.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Filter.cpp LibPDF: Send jpeg data down the same path as all other data 2024-01-10 09:39:00 +01:00
Filter.h LibPDF: Let decode_png_prediction() call LibGfx's unfilter_scanline() 2023-11-17 19:09:50 +01:00
Forward.h Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
Function.cpp LibPDF: Use mix() in SampledFunction::evaluate() 2024-01-04 21:12:23 +01:00
Function.h LibPDF: Add scaffolding for function objects 2023-11-06 10:01:05 +01:00
Interpolation.cpp LibPDF: Add first interpolation methods 2022-12-10 10:49:03 +01:00
Interpolation.h LibPDF: Add first interpolation methods 2022-12-10 10:49:03 +01:00
Object.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
ObjectDerivatives.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
ObjectDerivatives.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Operator.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Page.cpp LibPDF: Don't accidentally form new tokens on pages with contents arrays 2023-10-23 13:23:54 -04:00
Page.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Parser.cpp LibPDF: Improve hex string parsing 2024-01-02 22:13:21 +01:00
Parser.h LibPDF: Extract Parser::parse_inline_image() 2023-12-22 10:58:54 +01:00
Reader.cpp LibPDF: Add Reader::consume_non_eol_whitespace() 2024-01-04 10:14:30 +01:00
Reader.h LibPDF: Add Reader::consume_non_eol_whitespace() 2024-01-04 10:14:30 +01:00
Reference.h LibPDF: Make Reference store two u32s instead of one 2023-07-10 17:48:15 +01:00
Renderer.cpp LibPDF: Mark text rendering matrix as dirty after TJ numbers 2024-01-15 08:39:04 +00:00
Renderer.h LibPDF: Move error for /ImageMask out of load_image() 2023-12-23 20:39:11 +01:00
Value.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Value.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
XRefTable.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30