mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
LibPDF: Apply text matrix scale to character and word spacing
This commit is contained in:
parent
e3cc05b935
commit
18b86b1868
Notes:
sideshowbarker
2024-07-17 05:09:48 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/18b86b1868 Pull-request: https://github.com/SerenityOS/serenity/pull/20144 Reviewed-by: https://github.com/trflynn89
@ -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…
Reference in New Issue
Block a user