I ran into a problem while using Measuretext().
My goal is to ru
#include <raylib.h>
int main()
{
Font font=GetFontDefault();
const char *text="Hello world!";
float fontSize=10.f;
float spacing=10.f;
Vector2 textSize;
textSize=MeasureTextEx(font, text, fontSize, spacing);
return 0;
}
I tried modifying the sourcecode of MeasureText() but upon removing part of the code, it also returned segmentation fault
#include <raylib.h>
int main()
{
Font font=GetFontDefault();
const char *text="Hello world!";
float fontSize=10.f;
float spacing=10.f;
Vector2 vec;
// Check if default font has been loaded
if (GetFontDefault().texture.id != 0) //<- Upon removing this, it also returns segmentation fauls
{
vec = MeasureTextEx(font, text, (float)fontSize, (float)spacing);
}
return 0;
}