mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
LibPDF: Pass the right point width to the font loader in TrueTypeFont
This commit is contained in:
parent
fd78875662
commit
3400779047
Notes:
sideshowbarker
2024-07-16 22:34:20 +09:00
Author: https://github.com/janso3 Commit: https://github.com/SerenityOS/serenity/commit/3400779047 Pull-request: https://github.com/SerenityOS/serenity/pull/17975
@ -23,7 +23,7 @@ PDFErrorOr<void> TrueTypeFont::initialize(Document* document, NonnullRefPtr<Dict
|
||||
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()));
|
||||
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…
Reference in New Issue
Block a user