mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibPDF: Apply text matrix scale to character and word spacing
This commit is contained in:
parent
e3cc05b935
commit
18b86b1868
1 changed files with 1 additions and 1 deletions
|
@ -754,7 +754,7 @@ PDFErrorOr<void> Renderer::show_text(DeprecatedString const& string)
|
|||
auto font_size = text_rendering_matrix.x_scale() * text_state().font_size;
|
||||
|
||||
auto start_position = text_rendering_matrix.map(Gfx::FloatPoint { 0.0f, 0.0f });
|
||||
auto end_position = TRY(text_state().font->draw_string(m_painter, start_position, string, state().paint_color, font_size, text_state().character_spacing, text_state().word_spacing, text_state().horizontal_scaling));
|
||||
auto end_position = TRY(text_state().font->draw_string(m_painter, start_position, string, state().paint_color, font_size, text_state().character_spacing * text_rendering_matrix.x_scale(), text_state().word_spacing * text_rendering_matrix.x_scale(), text_state().horizontal_scaling));
|
||||
|
||||
// Update text matrix
|
||||
auto delta_x = end_position.x() - start_position.x();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue