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

LibPDF: Make SimpleFont::draw_glyph() fallible

This commit is contained in:
Nico Weber 2023-11-14 08:26:46 -05:00 committed by Sam Atkins
parent 843e9daa8c
commit 6c1da5db54
6 changed files with 9 additions and 7 deletions

View file

@ -18,7 +18,7 @@ public:
protected:
PDFErrorOr<void> initialize(Document* document, NonnullRefPtr<DictObject> const& dict, float font_size) override;
virtual Optional<float> get_glyph_width(u8 char_code) const = 0;
virtual void draw_glyph(Gfx::Painter& painter, Gfx::FloatPoint point, float width, u8 char_code, Color color) = 0;
virtual PDFErrorOr<void> draw_glyph(Gfx::Painter& painter, Gfx::FloatPoint point, float width, u8 char_code, Color color) = 0;
RefPtr<Encoding>& encoding() { return m_encoding; }
RefPtr<Encoding> const& encoding() const { return m_encoding; }