1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:27:45 +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

@ -8,6 +8,7 @@
#include <AK/Forward.h>
#include <LibGfx/AffineTransform.h>
#include <LibGfx/Font/Font.h>
#include <LibGfx/Path.h>
#include <LibPDF/Error.h>
@ -20,7 +21,7 @@ class PS1FontProgram : public RefCounted<PS1FontProgram> {
public:
PDFErrorOr<void> create(ReadonlyBytes const&, RefPtr<Encoding>, size_t cleartext_length, size_t encrypted_length);
RefPtr<Gfx::Bitmap> rasterize_glyph(u32 char_code, float width);
RefPtr<Gfx::Bitmap> rasterize_glyph(u32 char_code, float width, Gfx::GlyphSubpixelOffset);
Gfx::Path build_char(u32 char_code, float width);
RefPtr<Encoding> encoding() const { return m_encoding; }