diff options
| author | veclavtalica <[email protected]> | 2022-06-24 13:59:31 +0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-06-24 10:59:31 +0200 |
| commit | 63568721f9aace1a6f4c232d49b490ebb473b510 (patch) | |
| tree | d45c482cc747e96c2a7759ac1aa327dd2314bc09 /src/rtext.c | |
| parent | 3c3f08c4162bda19ebab4b86d3a25692bc647df3 (diff) | |
| download | raylib-63568721f9aace1a6f4c232d49b490ebb473b510.tar.gz raylib-63568721f9aace1a6f4c232d49b490ebb473b510.zip | |
fix: precision loss, discard unused (#2541)
Diffstat (limited to 'src/rtext.c')
| -rw-r--r-- | src/rtext.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rtext.c b/src/rtext.c index b9dc5e9d..722dbb1d 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1051,7 +1051,7 @@ void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, f { // NOTE: Fixed line spacing of 1.5 line-height // TODO: Support custom line spacing defined by user - textOffsetY += (int)((font.baseSize + font.baseSize/2)*scaleFactor); + textOffsetY += (int)((font.baseSize + font.baseSize/2.0f)*scaleFactor); textOffsetX = 0.0f; } else @@ -1123,7 +1123,7 @@ void DrawTextCodepoints(Font font, const int *codepoints, int count, Vector2 pos { // NOTE: Fixed line spacing of 1.5 line-height // TODO: Support custom line spacing defined by user - textOffsetY += (int)((font.baseSize + font.baseSize/2)*scaleFactor); + textOffsetY += (int)((font.baseSize + font.baseSize/2.0f)*scaleFactor); textOffsetX = 0.0f; } else |
