浏览代码

Reverted `MeasureTextEx()` change #3105

Ray 2 年之前
父节点
当前提交
685d47938b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/rtext.c

+ 1 - 1
src/rtext.c

@@ -1254,7 +1254,7 @@ Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing
 
 
     if (tempTextWidth < textWidth) tempTextWidth = textWidth;
     if (tempTextWidth < textWidth) tempTextWidth = textWidth;
 
 
-    textSize.x = (tempTextWidth + (float)((tempByteCounter - 1)*spacing))*scaleFactor;
+    textSize.x = tempTextWidth*scaleFactor + (float)((tempByteCounter - 1)*spacing);
     textSize.y = textHeight*scaleFactor;
     textSize.y = textHeight*scaleFactor;
 
 
     return textSize;
     return textSize;