Update rtext.c
This commit is contained in:
parent
c0c2e28c1b
commit
e9291fa4c7
1 changed files with 3 additions and 3 deletions
|
@ -2368,11 +2368,11 @@ static GlyphInfo *LoadFontDataBDF(const unsigned char *fileData, int dataSize, i
|
||||||
|
|
||||||
for (int bitX = 0; bitX < 4; bitX++)
|
for (int bitX = 0; bitX < 4; bitX++)
|
||||||
{
|
{
|
||||||
int pixelX = ((x * 4) + bitX);
|
int pixelX = ((x*4) + bitX);
|
||||||
|
|
||||||
if (pixelX >= charGlyphInfo->image.width) break;
|
if (pixelX >= charGlyphInfo->image.width) break;
|
||||||
|
|
||||||
if ((byte & (8 >> bitX)) > 0) ((unsigned char*)charGlyphInfo->image.data)[(pixelY * charGlyphInfo->image.width) + pixelX] = 255;
|
if ((byte & (8 >> bitX)) > 0) ((unsigned char *)charGlyphInfo->image.data)[(pixelY*charGlyphInfo->image.width) + pixelX] = 255;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2423,7 +2423,7 @@ static GlyphInfo *LoadFontDataBDF(const unsigned char *fileData, int dataSize, i
|
||||||
charGlyphInfo->offsetY = fontBBh - (charBBh + charBByoff0 + fontBByoff0 + fontAscent);
|
charGlyphInfo->offsetY = fontBBh - (charBBh + charBByoff0 + fontBByoff0 + fontAscent);
|
||||||
charGlyphInfo->advanceX = charDWidthX;
|
charGlyphInfo->advanceX = charDWidthX;
|
||||||
|
|
||||||
charGlyphInfo->image.data = RL_CALLOC(charBBw * charBBh, 1);
|
charGlyphInfo->image.data = RL_CALLOC(charBBw*charBBh, 1);
|
||||||
charGlyphInfo->image.width = charBBw;
|
charGlyphInfo->image.width = charBBw;
|
||||||
charGlyphInfo->image.height = charBBh;
|
charGlyphInfo->image.height = charBBh;
|
||||||
charGlyphInfo->image.mipmaps = 1;
|
charGlyphInfo->image.mipmaps = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue