mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibGfx: Return NonnullRefPtr
in Gfx::shape_text()
We always return a glyph run here.
This commit is contained in:
parent
c999dd0c9f
commit
6710aa102a
Notes:
github-actions[bot]
2025-06-17 09:57:14 +00:00
Author: https://github.com/gmta
Commit: 6710aa102a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5104
2 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ Vector<NonnullRefPtr<GlyphRun>> shape_text(FloatPoint baseline_start, Utf8View s
|
||||||
return runs;
|
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();
|
static hb_buffer_t* buffer = hb_buffer_create();
|
||||||
hb_buffer_add_utf8(buffer, reinterpret_cast<char const*>(string.bytes()), string.byte_length(), 0, -1);
|
hb_buffer_add_utf8(buffer, reinterpret_cast<char const*>(string.bytes()), string.byte_length(), 0, -1);
|
||||||
|
|
|
@ -70,7 +70,7 @@ private:
|
||||||
float m_width { 0 };
|
float m_width { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
RefPtr<GlyphRun> shape_text(FloatPoint baseline_start, float letter_spacing, Utf8View string, Gfx::Font const& font, GlyphRun::TextType, ShapeFeatures const& features);
|
NonnullRefPtr<GlyphRun> shape_text(FloatPoint baseline_start, float letter_spacing, Utf8View string, Gfx::Font const& font, GlyphRun::TextType, ShapeFeatures const& features);
|
||||||
Vector<NonnullRefPtr<GlyphRun>> shape_text(FloatPoint baseline_start, Utf8View string, FontCascadeList const&);
|
Vector<NonnullRefPtr<GlyphRun>> shape_text(FloatPoint baseline_start, Utf8View string, FontCascadeList const&);
|
||||||
float measure_text_width(Utf8View const& string, Gfx::Font const& font, ShapeFeatures const& features);
|
float measure_text_width(Utf8View const& string, Gfx::Font const& font, ShapeFeatures const& features);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue