LibGfx: Return NonnullRefPtr in Gfx::shape_text()

We always return a glyph run here.
This commit is contained in:
Jelle Raaijmakers 2025-06-16 11:50:01 +02:00 committed by Jelle Raaijmakers
commit 6710aa102a
Notes: github-actions[bot] 2025-06-17 09:57:14 +00:00
2 changed files with 2 additions and 2 deletions

View file

@ -52,7 +52,7 @@ Vector<NonnullRefPtr<GlyphRun>> shape_text(FloatPoint baseline_start, Utf8View s
return runs;
}
RefPtr<GlyphRun> shape_text(FloatPoint baseline_start, float letter_spacing, Utf8View string, Gfx::Font const& font, GlyphRun::TextType text_type, ShapeFeatures const& features)
NonnullRefPtr<GlyphRun> shape_text(FloatPoint baseline_start, float letter_spacing, Utf8View string, Gfx::Font const& font, GlyphRun::TextType text_type, ShapeFeatures const& features)
{
static hb_buffer_t* buffer = hb_buffer_create();
hb_buffer_add_utf8(buffer, reinterpret_cast<char const*>(string.bytes()), string.byte_length(), 0, -1);