X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=raylib_pi4_test%2Ftext.c;h=3a49963a74a5f28e988b839f88f325e3e03e9c47;hb=df3221c950ed9213701954d8967e92ce4d718e36;hp=3e821fe80291f30eb723ee117c36a28dc9b3deba;hpb=9cd49594200782c4dc00d9030056e427bf3e170c;p=pistorm diff --git a/raylib_pi4_test/text.c b/raylib_pi4_test/text.c index 3e821fe..3a49963 100644 --- a/raylib_pi4_test/text.c +++ b/raylib_pi4_test/text.c @@ -848,14 +848,12 @@ void DrawText(const char *text, int posX, int posY, int fontSize, Color color) // NOTE: chars spacing is NOT proportional to fontSize void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint) { - if (font.texture.id == 0) font = GetFontDefault(); // Security check in case of not valid font - - int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop + int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop int textOffsetY = 0; // Offset between lines (on line break '\n') float textOffsetX = 0.0f; // Offset X to next character to draw - float scaleFactor = fontSize/font.baseSize; // Character quad scaling factor + float scaleFactor = fontSize/font.baseSize; // Character quad scaling factor for (int i = 0; i < length;) {