mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
LibGfx: Make Painter::draw_text() interpret StringView as UTF-8
This commit is contained in:
parent
7e5199a394
commit
9af33e2e4b
1 changed files with 1 additions and 1 deletions
|
@ -1068,7 +1068,7 @@ void Painter::draw_text(const IntRect& rect, const Utf32View& text, TextAlignmen
|
||||||
void Painter::draw_text(const IntRect& rect, const StringView& raw_text, const Font& font, TextAlignment alignment, Color color, TextElision elision)
|
void Painter::draw_text(const IntRect& rect, const StringView& raw_text, const Font& font, TextAlignment alignment, Color color, TextElision elision)
|
||||||
{
|
{
|
||||||
Utf8View text { raw_text };
|
Utf8View text { raw_text };
|
||||||
do_draw_text(rect, text, font, alignment, elision, [&](const IntRect& r, u32 code_point) {
|
do_draw_text(rect, Utf8View(text), font, alignment, elision, [&](const IntRect& r, u32 code_point) {
|
||||||
draw_glyph_or_emoji(r.location(), code_point, font, color);
|
draw_glyph_or_emoji(r.location(), code_point, font, color);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue