mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibGfx+AK: Make text elision work with multi-byte characters
This was causing WindowServer and Taskbar to crash sometimes when the stars aligned and we tried cutting off a string ending with "..." right on top of an emoji. :^)
This commit is contained in:
parent
9af33e2e4b
commit
13594b7146
Notes:
sideshowbarker
2024-07-19 00:28:56 +09:00
Author: https://github.com/awesomekling
Commit: 13594b7146
4 changed files with 17 additions and 4 deletions
|
@ -65,7 +65,7 @@ Utf8CodepointIterator Utf8View::end() const
|
|||
return { end_ptr(), 0 };
|
||||
}
|
||||
|
||||
int Utf8View::byte_offset_of(const Utf8CodepointIterator& it) const
|
||||
size_t Utf8View::byte_offset_of(const Utf8CodepointIterator& it) const
|
||||
{
|
||||
ASSERT(it.m_ptr >= begin_ptr());
|
||||
ASSERT(it.m_ptr <= end_ptr());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue