diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-02-22 12:43:21 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-24 20:28:23 +0100 |
commit | 34567bc145da7c569f3afb8179670c1035d7173e (patch) | |
tree | f56a5f5172dad871c984c28756832aba60f129c0 /Tests | |
parent | 16ec116133f5e7c2d1a2c1a5d3c2140b97d143a4 (diff) | |
download | serenity-34567bc145da7c569f3afb8179670c1035d7173e.zip |
LibGfx: Remove single-code point Font::glyph_or_emoji_width API
All callers are now aware of multi-code point emoji (and must remain so
going forward).
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/LibGfx/TestFontHandling.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Tests/LibGfx/TestFontHandling.cpp b/Tests/LibGfx/TestFontHandling.cpp index 1aa905c3a5..a1cde06f26 100644 --- a/Tests/LibGfx/TestFontHandling.cpp +++ b/Tests/LibGfx/TestFontHandling.cpp @@ -5,6 +5,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include <AK/Utf8View.h> #include <LibGfx/Font/BitmapFont.h> #include <LibGfx/Font/FontDatabase.h> #include <LibTest/TestCase.h> @@ -125,7 +126,10 @@ TEST_CASE(test_glyph_or_emoji_width) u8 glyph_width = 1; auto font = Gfx::BitmapFont::create(glyph_height, glyph_width, true, 256); - EXPECT(font->glyph_or_emoji_width(0)); + Utf8View view { " "sv }; + auto it = view.begin(); + + EXPECT(font->glyph_or_emoji_width(it)); } TEST_CASE(test_load_from_file) |