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

LibGfx: Prepare the paint code for fonts whose glyphs are color bitmaps

This patch does three things:
- Font::has_color_bitmaps() (true if CBLC and CBDT are present)
- Glyph now knows when its bitmap comes from a color bitmap font
- Painter draws color bitmap glyphs with the appropriate scaling etc
This commit is contained in:
Andreas Kling 2023-03-04 20:33:02 +01:00
parent bca35bee6d
commit e8cc1a4373
8 changed files with 22 additions and 2 deletions

View file

@ -37,6 +37,7 @@ public:
virtual u16 width() const override { return m_input_font->width(); }
virtual u8 slope() const override { return m_input_font->slope(); }
virtual bool is_fixed_width() const override { return m_input_font->is_fixed_width(); }
virtual bool has_color_bitmaps() const override { return m_input_font->has_color_bitmaps(); }
private:
Font(NonnullRefPtr<Gfx::VectorFont const> input_font, ByteBuffer input_font_buffer)