mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
LibPDF: Fix "incorrect" matrix multiplication in Renderer
Incorrect is in quotes because the spec (both 1.7 and 2.0) specify this multiplication as it was originally! However, flipping the order of operations here makes the text in all of my test cases render in the correct position. The CTM is a transformation matrix between the text coordinate system and the device coordinate system. However, being on the right-side of the multiplication means that the CTM scale parameters don't have any influence on the translation component of the left-side matrix. This oddity is what originally led to me just trying this change to see if it worked.
This commit is contained in:
parent
6f1cfcf217
commit
4d509ff365
1 changed files with 1 additions and 1 deletions
|
@ -694,8 +694,8 @@ Gfx::AffineTransform const& Renderer::calculate_text_rendering_matrix()
|
|||
1.0f,
|
||||
0.0f,
|
||||
text_state().rise);
|
||||
m_text_rendering_matrix.multiply(m_text_matrix);
|
||||
m_text_rendering_matrix.multiply(state().ctm);
|
||||
m_text_rendering_matrix.multiply(m_text_matrix);
|
||||
m_text_rendering_matrix_is_dirty = false;
|
||||
}
|
||||
return m_text_rendering_matrix;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue