mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +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
Notes:
sideshowbarker
2024-07-17 17:50:33 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/4d509ff365 Pull-request: https://github.com/SerenityOS/serenity/pull/12920
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…
Reference in a new issue