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

LibGfx/OpenType: Support one specific type of embedded color bitmaps

This patch adds support for index format 1 and image format 17.
This is enough to get Noto Color Emoji working.
This commit is contained in:
Andreas Kling 2023-03-04 20:52:59 +01:00
parent e8cc1a4373
commit 924d23353e
5 changed files with 181 additions and 6 deletions

View file

@ -35,7 +35,7 @@ class VectorFont : public RefCounted<VectorFont> {
public:
virtual ~VectorFont() { }
virtual ScaledFontMetrics metrics(float x_scale, float y_scale) const = 0;
virtual ScaledGlyphMetrics glyph_metrics(u32 glyph_id, float x_scale, float y_scale) const = 0;
virtual ScaledGlyphMetrics glyph_metrics(u32 glyph_id, float x_scale, float y_scale, float point_width, float point_height) const = 0;
virtual float glyphs_horizontal_kerning(u32 left_glyph_id, u32 right_glyph_id, float x_scale) const = 0;
virtual RefPtr<Gfx::Bitmap> rasterize_glyph(u32 glyph_id, float x_scale, float y_scale, GlyphSubpixelOffset) const = 0;
virtual u32 glyph_count() const = 0;