|
|
@@ -213,8 +213,8 @@ void Font::drawText(const char* text, int x, int y, const Vector4& color, float
|
|
|
xPos += (size>>1)*4;
|
|
|
break;
|
|
|
default:
|
|
|
- unsigned int index = c - 32; // HACK for ASCII
|
|
|
- if (index >= 0 && index < _glyphCount)
|
|
|
+ int index = c - 32; // HACK for ASCII
|
|
|
+ if (index >= 0 && index < (int)_glyphCount)
|
|
|
{
|
|
|
Glyph& g = _glyphs[index];
|
|
|
_batch->draw(xPos, yPos, g.width * scale, size, g.uvs[0], g.uvs[1], g.uvs[2], g.uvs[3], color);
|
|
|
@@ -555,9 +555,9 @@ void Font::drawText(const char* text, const Rectangle& area, const Vector4& colo
|
|
|
for (unsigned int i = 0; i < tokenLength; ++i)
|
|
|
{
|
|
|
char c = token[i];
|
|
|
- unsigned int glyphIndex = c - 32; // HACK for ASCII
|
|
|
+ int glyphIndex = c - 32; // HACK for ASCII
|
|
|
|
|
|
- if (glyphIndex >= 0 && glyphIndex < _glyphCount)
|
|
|
+ if (glyphIndex >= 0 && glyphIndex < (int)_glyphCount)
|
|
|
{
|
|
|
Glyph& g = _glyphs[glyphIndex];
|
|
|
|
|
|
@@ -971,8 +971,8 @@ unsigned int Font::getTokenWidth(const char* token, unsigned int length, float s
|
|
|
tokenWidth += (size>>1)*4;
|
|
|
break;
|
|
|
default:
|
|
|
- unsigned int glyphIndex = c - 32;
|
|
|
- if (glyphIndex >= 0 && glyphIndex < _glyphCount)
|
|
|
+ int glyphIndex = c - 32;
|
|
|
+ if (glyphIndex >= 0 && glyphIndex < (int)_glyphCount)
|
|
|
{
|
|
|
Glyph& g = _glyphs[glyphIndex];
|
|
|
tokenWidth += g.width * scale + (size>>3);
|