mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:27:35 +00:00
LibPDF: Pass the right point width to the font loader in TrueTypeFont
This commit is contained in:
parent
fd78875662
commit
3400779047
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ PDFErrorOr<void> TrueTypeFont::initialize(Document* document, NonnullRefPtr<Dict
|
||||||
auto font_file_stream = TRY(descriptor->get_stream(document, CommonNames::FontFile2));
|
auto font_file_stream = TRY(descriptor->get_stream(document, CommonNames::FontFile2));
|
||||||
auto ttf_font = TRY(OpenType::Font::try_load_from_externally_owned_memory(font_file_stream->bytes()));
|
auto ttf_font = TRY(OpenType::Font::try_load_from_externally_owned_memory(font_file_stream->bytes()));
|
||||||
float point_size = (font_size * POINTS_PER_INCH) / DEFAULT_DPI;
|
float point_size = (font_size * POINTS_PER_INCH) / DEFAULT_DPI;
|
||||||
m_font = adopt_ref(*new Gfx::ScaledFont(*ttf_font, font_size, point_size));
|
m_font = adopt_ref(*new Gfx::ScaledFont(*ttf_font, point_size, point_size));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue