aboutsummaryrefslogtreecommitdiff
path: root/generate-emoji-sprite.py
diff options
context:
space:
mode:
Diffstat (limited to 'generate-emoji-sprite.py')
-rwxr-xr-xgenerate-emoji-sprite.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/generate-emoji-sprite.py b/generate-emoji-sprite.py
index 887d6c8..bc26843 100755
--- a/generate-emoji-sprite.py
+++ b/generate-emoji-sprite.py
@@ -42,7 +42,6 @@ namespace QuickMedia {
with open("generated/Emoji.cpp", "w") as source_file:
source_file.write("""#include "Emoji.hpp"
-#include <assert.h>
// This file was automatically generated with generate-emoji-sprite.py, do not edit manually!
@@ -66,8 +65,9 @@ namespace QuickMedia {
}
EmojiRectangle emoji_get_extents(uint32_t codepoint) {
- assert(codepoint_is_emoji(codepoint));
+ if(codepoint < 0x1F000 || codepoint - 0x1F000 >= %s)
+ return { 0, 0, 0, 0 };
return emoji_extents[codepoint - 0x1F000];
}
}
-""")
+""" % len(emoji_characters))