feature request - LoadFontEx / LoadFont
guillaC opened this issue · comments
Unfortunately, the signature doesn't make it straightforward to use the LoadFontEx method, unlike the LoadFont method which accepts a string for the file path.
in the meantime, I'm doing:
public static Raylib_cs.Font LoadFontEx(string fileName, int fontSize)
{
byte[] cheminBytes = System.Text.Encoding.ASCII.GetBytes(fileName);
unsafe
{
fixed (byte* pChemin = cheminBytes)
{
return Raylib.LoadFontEx((sbyte*)pChemin, fontSize, null, 0);
}
}
}
There is an existing utility method for LoadFontEx here. Look at the FontLoading example to see how it is used.