We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c389db7 commit 488e1d4Copy full SHA for 488e1d4
src/text_utils.h
@@ -14,9 +14,8 @@
14
// Used by both the renderer (for drawing text) and the VM (for string_width/string_height).
15
16
static inline FontGlyph* TextUtils_findGlyph(Font* font, uint16_t ch) {
17
- if (ch >= font->rangeStart && font->rangeEnd >= ch) {
18
- uint32_t index = ch - font->rangeStart;
19
- if (font->glyphCount > index) return &font->glyphs[index];
+ repeat(font->glyphCount, i) {
+ if (font->glyphs[i].character == ch) return &font->glyphs[i];
20
}
21
return nullptr;
22
0 commit comments