Browse Source

Corrected issue with text drawing on image

pull/384/head
Ray San 7 years ago
parent
commit
37986b26cb
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/textures.c

+ 2
- 1
src/textures.c View File

@ -1088,7 +1088,8 @@ Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing
ImageDraw(&imText, imFont, letter.rec, (Rectangle){ posX + letter.offsetX,
letter.offsetY, letter.rec.width, letter.rec.height });
posX += letter.advanceX + spacing;
if (letter.advanceX == 0) posX += letter.rec.width + spacing;
else posX += letter.advanceX + spacing;
}
UnloadImage(imFont);

Loading…
Cancel
Save