LibPDF: Account for inverted y axis when rendering text
This commit is contained in:
parent
e7b70a1435
commit
cafd7c11b4
Notes:
sideshowbarker
2024-07-18 12:21:34 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/cafd7c11b42 Pull-request: https://github.com/SerenityOS/serenity/pull/7675 Reviewed-by: https://github.com/FireFox317 Reviewed-by: https://github.com/alimpfard
1 changed files with 1 additions and 0 deletions
|
@ -540,6 +540,7 @@ void Renderer::show_text(const String& string, int shift)
|
|||
|
||||
auto text_position = text_rendering_matrix.map(Gfx::FloatPoint { 0.0f, 0.0f });
|
||||
text_position.set_y(static_cast<float>(m_bitmap->height()) - text_position.y());
|
||||
text_position.set_y(text_position.y() - static_cast<float>(font->baseline()));
|
||||
|
||||
// FIXME: For some reason, the space character in LiberationSerif is drawn as an exclamation point
|
||||
if (code_point != 0x20)
|
||||
|
|
Loading…
Add table
Reference in a new issue