Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/rtext.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing
float textWidth = 0.0f;
float tempTextWidth = 0.0f; // Used to count longer text line width

float textHeight = (float)font.baseSize;
float textHeight = fontSize;
float scaleFactor = fontSize/(float)font.baseSize;

int letter = 0; // Current character
Expand Down Expand Up @@ -1294,7 +1294,7 @@ Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing
if (tempTextWidth < textWidth) tempTextWidth = textWidth;

textSize.x = tempTextWidth*scaleFactor + (float)((tempByteCounter - 1)*spacing);
textSize.y = textHeight*scaleFactor;
textSize.y = textHeight;

return textSize;
}
Expand Down