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

LibPDF: Accept font size in PDFFont::get_char_width

This will be required for TTF fonts
This commit is contained in:
Matthew Olsson 2022-03-25 08:14:19 -07:00 committed by Andreas Kling
parent 5f9d35909d
commit 058cf5f7f7
4 changed files with 4 additions and 4 deletions

View file

@ -654,7 +654,7 @@ void Renderer::show_text(String const& string, float shift)
for (auto char_code : string.bytes()) {
auto code_point = text_state().font->char_code_to_code_point(char_code);
auto char_width = text_state().font->get_char_width(char_code);
auto char_width = text_state().font->get_char_width(char_code, font_size);
if (code_point != 0x20)
m_painter.draw_glyph(glyph_position.to_type<int>(), code_point, *font, state().paint_color);