|
|
@ -1541,12 +1541,12 @@ STBTT_DEF int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codep |
|
|
|
search += 2; |
|
|
|
search += 2; |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
stbtt_uint16 offset, start; |
|
|
|
stbtt_uint16 offset, start, last; |
|
|
|
stbtt_uint16 item = (stbtt_uint16) ((search - endCount) >> 1); |
|
|
|
stbtt_uint16 item = (stbtt_uint16) ((search - endCount) >> 1); |
|
|
|
|
|
|
|
|
|
|
|
STBTT_assert(unicode_codepoint <= ttUSHORT(data + endCount + 2*item)); |
|
|
|
|
|
|
|
start = ttUSHORT(data + index_map + 14 + segcount*2 + 2 + 2*item); |
|
|
|
start = ttUSHORT(data + index_map + 14 + segcount*2 + 2 + 2*item); |
|
|
|
if (unicode_codepoint < start) |
|
|
|
last = ttUSHORT(data + endCount + 2*item); |
|
|
|
|
|
|
|
if (unicode_codepoint < start || unicode_codepoint > last) |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
|
|
offset = ttUSHORT(data + index_map + 14 + segcount*6 + 2 + 2*item); |
|
|
|
offset = ttUSHORT(data + index_map + 14 + segcount*6 + 2 + 2*item); |
|
|
|