diff options
author | Andreas Kling <kling@serenityos.org> | 2020-12-28 23:50:32 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-28 23:54:10 +0100 |
commit | 9af33e2e4b22500ff9fd96fb181a8ac89ad4b3a3 (patch) | |
tree | 1daf4fd442fb57a723f41f4a5da9fa99a8314e43 /Libraries/LibGfx | |
parent | 7e5199a394444d45f8cd642a4a8bdf18519b5d6c (diff) | |
download | serenity-9af33e2e4b22500ff9fd96fb181a8ac89ad4b3a3.zip |
LibGfx: Make Painter::draw_text() interpret StringView as UTF-8
Diffstat (limited to 'Libraries/LibGfx')
-rw-r--r-- | Libraries/LibGfx/Painter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGfx/Painter.cpp b/Libraries/LibGfx/Painter.cpp index 01707fd532..ca96ef068b 100644 --- a/Libraries/LibGfx/Painter.cpp +++ b/Libraries/LibGfx/Painter.cpp @@ -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) { 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); }); } |