mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibUnicode: Allow ignoring text presentation emoji in sequence detection
This adds an option to only detect emoji that should always present as emoji. For example, the copyright symbol (unless followed by an emoji presentation selector) should render as text.
This commit is contained in:
parent
c06f4ac6f5
commit
42c272c059
2 changed files with 24 additions and 11 deletions
|
@ -47,8 +47,13 @@ Optional<Emoji> find_emoji_for_code_points(u32 const (&code_points)[Size])
|
|||
return find_emoji_for_code_points(ReadonlySpan<u32> { code_points });
|
||||
}
|
||||
|
||||
bool could_be_start_of_emoji_sequence(Utf8CodePointIterator const&);
|
||||
bool could_be_start_of_emoji_sequence(Utf32CodePointIterator const&);
|
||||
enum class SequenceType {
|
||||
Any,
|
||||
EmojiPresentation,
|
||||
};
|
||||
|
||||
bool could_be_start_of_emoji_sequence(Utf8CodePointIterator const&, SequenceType = SequenceType::Any);
|
||||
bool could_be_start_of_emoji_sequence(Utf32CodePointIterator const&, SequenceType = SequenceType::Any);
|
||||
|
||||
constexpr StringView emoji_group_to_string(EmojiGroup group)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue