summaryrefslogtreecommitdiffhomepage
path: root/src/text.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2020-01-19 12:49:33 +0100
committerraysan5 <[email protected]>2020-01-19 12:49:33 +0100
commit9c52a4932d8f5495724bb94a2e64b646df44fc29 (patch)
tree41b2b221d4a3939e856dcba0da5ebcfd066b1cde /src/text.c
parentedc1d2511d1c12d99c4d2f4313cb1f452acd1600 (diff)
downloadraylib-9c52a4932d8f5495724bb94a2e64b646df44fc29.tar.gz
raylib-9c52a4932d8f5495724bb94a2e64b646df44fc29.zip
Corrected issue with types
Diffstat (limited to 'src/text.c')
-rw-r--r--src/text.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/text.c b/src/text.c
index 7fe70b86..ae5b98da 100644
--- a/src/text.c
+++ b/src/text.c
@@ -557,7 +557,7 @@ CharInfo *LoadFontData(const char *fileName, int fontSize, int *fontChars, int c
else chars[i].image.data = NULL;
stbtt_GetCodepointHMetrics(&fontInfo, ch, &chars[i].advanceX, NULL);
- chars[i].advanceX *= scaleFactor;
+ chars[i].advanceX = (int)((float)chars[i].advanceX*scaleFactor);
// Load characters images
chars[i].image.width = chw;
@@ -977,7 +977,7 @@ void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, f
bool isGlyphSelected = false;
if ((selectStart >= 0) && (k >= selectStart) && (k < (selectStart + selectLength)))
{
- DrawRectangleRec((Rectangle){ rec.x + textOffsetX - 1, rec.y + textOffsetY, glyphWidth, font.baseSize*scaleFactor }, selectBackTint);
+ DrawRectangleRec((Rectangle){ rec.x + textOffsetX - 1, rec.y + textOffsetY, glyphWidth, (int)((float)font.baseSize*scaleFactor) }, selectBackTint);
isGlyphSelected = true;
}