mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 19:37:35 +00:00
LibGfx+LibAccelGfx+LibWeb: Use RefPtr for font in DrawGlyphOrEmoji
This commit is contained in:
parent
451df70275
commit
0d03257e69
5 changed files with 11 additions and 11 deletions
|
@ -224,7 +224,7 @@ DrawGlyphOrEmoji prepare_draw_glyph_or_emoji(FloatPoint point, Utf8CodePointIter
|
|||
return DrawGlyph {
|
||||
.position = point,
|
||||
.code_point = code_point,
|
||||
.font = &font,
|
||||
.font = font,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,7 @@ DrawGlyphOrEmoji prepare_draw_glyph_or_emoji(FloatPoint point, Utf8CodePointIter
|
|||
return DrawEmoji {
|
||||
.position = point,
|
||||
.emoji = emoji,
|
||||
.font = &font,
|
||||
.font = font,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ DrawGlyphOrEmoji prepare_draw_glyph_or_emoji(FloatPoint point, Utf8CodePointIter
|
|||
return DrawGlyph {
|
||||
.position = point,
|
||||
.code_point = code_point,
|
||||
.font = &font,
|
||||
.font = font,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,7 @@ DrawGlyphOrEmoji prepare_draw_glyph_or_emoji(FloatPoint point, Utf8CodePointIter
|
|||
return DrawGlyph {
|
||||
.position = point,
|
||||
.code_point = 0xFFFD,
|
||||
.font = &font,
|
||||
.font = font,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -78,13 +78,13 @@ enum class IncludeLeftBearing {
|
|||
struct DrawGlyph {
|
||||
FloatPoint position;
|
||||
u32 code_point;
|
||||
Font const* font;
|
||||
NonnullRefPtr<Font const> font;
|
||||
};
|
||||
|
||||
struct DrawEmoji {
|
||||
FloatPoint position;
|
||||
Gfx::Bitmap const* emoji;
|
||||
Font const* font;
|
||||
NonnullRefPtr<Font const> font;
|
||||
};
|
||||
|
||||
using DrawGlyphOrEmoji = Variant<DrawGlyph, DrawEmoji>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue