Implement color emoji support on Android

This commit is contained in:
Henrik Rydgård committed 2023-08-06 15:14:29 +02:00
1 parent a477ca3f05
commit 63cfe28f61
9 files changed
+51 -15

No files matched your search

+11
View File
@@ -426,6 +426,17 @@ int u8_is_locale_utf8(const char *locale)
return 0;
}
bool AnyEmojiInString(const char *s, size_t byteCount) {
int i = 0;
while (i < byteCount) {
uint32_t c = u8_nextchar(s, &i);
if (CodepointIsProbablyEmoji(c)) {
return true;
}
}
return false;
}
int UTF8StringNonASCIICount(const char *utf8string) {
UTF8 utf(utf8string);
int count = 0;