mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
LibPDF: Resize fonts when the text and line matrices change
This commit is contained in:
parent
9a0e1dde42
commit
5f8fd47214
8 changed files with 26 additions and 0 deletions
|
@ -458,6 +458,13 @@ RENDERER_HANDLER(text_set_matrix_and_line_matrix)
|
|||
m_text_line_matrix = new_transform;
|
||||
m_text_matrix = new_transform;
|
||||
m_text_rendering_matrix_is_dirty = true;
|
||||
|
||||
// Settings the text/line matrix retroactively affects fonts
|
||||
if (text_state().font) {
|
||||
auto new_text_rendering_matrix = calculate_text_rendering_matrix();
|
||||
text_state().font->set_font_size(text_state().font_size * new_text_rendering_matrix.x_scale());
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue