1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

LibPDF: Implement support for vertical text for Type0

For Identity-V only for now.
This commit is contained in:
Nico Weber 2024-03-01 10:44:29 -05:00 committed by Andreas Kling
parent 6348a857ea
commit c69797fda9
5 changed files with 65 additions and 11 deletions

View file

@ -1036,9 +1036,9 @@ PDFErrorOr<void> Renderer::show_text(ByteString const& string)
auto end_position = TRY(text_state().font->draw_string(m_painter, start_position, string, *this));
// Update text matrix.
auto delta_x = end_position.x() - start_position.x();
auto delta = end_position - start_position;
m_text_rendering_matrix_is_dirty = true;
m_text_matrix.translate(delta_x * text_state().horizontal_scaling, 0.0f);
m_text_matrix.translate(delta);
return {};
}