1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

LibPDF: Use subpixel accurate text rendering

This just enables the new tricks from LibGfx with the same nice
improvements :^)
This commit is contained in:
MacDue 2023-01-05 01:34:07 +00:00 committed by Andreas Kling
parent 6632023498
commit 91db49f7b3
9 changed files with 24 additions and 18 deletions

View file

@ -747,7 +747,7 @@ void Renderer::show_text(DeprecatedString const& string)
auto glyph_width = char_width * font_size;
if (code_point != 0x20)
text_state().font->draw_glyph(m_painter, glyph_position.to_type<int>(), glyph_width, char_code, state().paint_color);
text_state().font->draw_glyph(m_painter, glyph_position, glyph_width, char_code, state().paint_color);
auto tx = glyph_width;
tx += text_state().character_spacing;