mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
LibPDF: Mark text rendering matrix dirty for Td operator
0000342.pdf page 5 contains this snippet: ``` /T1_1 10.976 Tf 0 -31.643 TD (This)Tj 1 0 0 1 54 745.563 Tm 22.181 -31.643 Td [(vehicle)-270.926(uses)... ``` The `Tm` marked the text rendering matrix as dirty at the start, but it then calls calculate_text_rendering_matrix() almost in the next line, which recalculates the text rendering matrix and caches the new matrix. The `Td` used to not mark it as dirty, and we'd draw "vehicle" with an incorrect matrix.
This commit is contained in:
parent
7c2713c14f
commit
f23f5dcd62
Notes:
sideshowbarker
2024-07-16 19:17:47 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/f23f5dcd62 Pull-request: https://github.com/SerenityOS/serenity/pull/22760
@ -503,6 +503,7 @@ RENDERER_HANDLER(text_next_line_offset)
|
||||
Gfx::AffineTransform transform(1.0f, 0.0f, 0.0f, 1.0f, args[0].to_float(), args[1].to_float());
|
||||
m_text_line_matrix.multiply(transform);
|
||||
m_text_matrix = m_text_line_matrix;
|
||||
m_text_rendering_matrix_is_dirty = true;
|
||||
return {};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user