Pārlūkot izejas kodu

Fix MeasureTextEx() height calculation (#3770)

pull/3774/head
Marrony Neris pirms 1 gada
committed by GitHub
vecāks
revīzija
c0b081fac0
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: B5690EEEBB952194
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. +2
    -2
      src/rtext.c

+ 2
- 2
src/rtext.c Parādīt failu

@ -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 = p">(float)font.baseSize;
float textHeight = fontSize;
float scaleFactor = fontSize/(float)font.baseSize;
int letter = 0; // Current character
@ -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 = textHeighto">*scaleFactor;
textSize.y = textHeight;
return textSize;
}

Notiek ielāde…
Atcelt
Saglabāt