It bothered me that the text was not centre justified so I sought a way to solve the issue.
There is a function to return the width value of text to be used in raylib’s DrawText(), its MeasureText(). I am not sure why it only evaluates and returns the width value, but its something at least.
// WIN THE GAME
int textWinGame = MeasureText(“You Won!”, 60);
DrawText(“You Won!”, (WindowDimensions[0] / 2) - (textWinGame / 2), WindowDimensions[1] / 2, 60, GREEN);
If we had used DrawTextEx(), it looks like MeasureTextEx() returns the width and height values.