fix warnings in OpenGLTrueTypeFont
This commit is contained in:
@@ -353,7 +353,7 @@ static struct sth_glyph* get_glyph(struct sth_stash* stash, struct sth_font* fnt
|
||||
float scale;
|
||||
struct sth_texture* texture = NULL;
|
||||
struct sth_glyph* glyph = NULL;
|
||||
unsigned char* bmp = NULL;
|
||||
|
||||
unsigned int h;
|
||||
float size = isize/10.0f;
|
||||
int rh;
|
||||
|
||||
@@ -813,7 +813,7 @@ int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codepoint)
|
||||
stbtt_uint16 searchRange = ttUSHORT(data+index_map+8) >> 1;
|
||||
stbtt_uint16 entrySelector = ttUSHORT(data+index_map+10);
|
||||
stbtt_uint16 rangeShift = ttUSHORT(data+index_map+12) >> 1;
|
||||
stbtt_uint16 item, offset, start, end;
|
||||
stbtt_uint16 item, offset, start;
|
||||
|
||||
// do a binary search of the segments
|
||||
stbtt_uint32 endCount = index_map + 14;
|
||||
@@ -830,11 +830,8 @@ int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codepoint)
|
||||
// now decrement to bias correctly to find smallest
|
||||
search -= 2;
|
||||
while (entrySelector) {
|
||||
stbtt_uint16 start, end;
|
||||
stbtt_uint16 end;
|
||||
searchRange >>= 1;
|
||||
start = ttUSHORT(data + search + 2 + segcount*2 + 2);
|
||||
end = ttUSHORT(data + search + 2);
|
||||
start = ttUSHORT(data + search + searchRange*2 + segcount*2 + 2);
|
||||
end = ttUSHORT(data + search + searchRange*2);
|
||||
if (unicode_codepoint > end)
|
||||
search += searchRange*2;
|
||||
@@ -846,7 +843,7 @@ int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codepoint)
|
||||
|
||||
STBTT_assert(unicode_codepoint <= ttUSHORT(data + endCount + 2*item));
|
||||
start = ttUSHORT(data + index_map + 14 + segcount*2 + 2 + 2*item);
|
||||
end = ttUSHORT(data + index_map + 14 + 2 + 2*item);
|
||||
|
||||
if (unicode_codepoint < start)
|
||||
return 0;
|
||||
|
||||
@@ -858,7 +855,7 @@ int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codepoint)
|
||||
} else if (format == 12 || format == 13) {
|
||||
stbtt_uint32 ngroups = ttULONG(data+index_map+12);
|
||||
stbtt_int32 low,high;
|
||||
stbtt_uint16 g = 0;
|
||||
//stbtt_uint16 g = 0;
|
||||
low = 0; high = (stbtt_int32)ngroups;
|
||||
// Binary search the right group.
|
||||
while (low < high) {
|
||||
@@ -966,7 +963,7 @@ int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stbtt_verte
|
||||
|
||||
if (numberOfContours > 0) {
|
||||
stbtt_uint8 flags=0,flagcount;
|
||||
stbtt_int32 ins, i,j=0,m,n, next_move, was_off=0, off, start_off=0, curve_end=0;
|
||||
stbtt_int32 ins, i,j=0,m,n, next_move, was_off=0, off, start_off=0;
|
||||
stbtt_int32 x,y,cx,cy,sx,sy, scx,scy;
|
||||
scx=0;
|
||||
scy=0;
|
||||
|
||||
Reference in New Issue
Block a user