diff --git a/Raylib-cs/interop/Raylib.cs b/Raylib-cs/interop/Raylib.cs
index 059065d..eeaec0d 100644
--- a/Raylib-cs/interop/Raylib.cs
+++ b/Raylib-cs/interop/Raylib.cs
@@ -1431,7 +1431,7 @@ namespace Raylib_cs
/// Load font from file with extended parameters
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern Font LoadFontEx(sbyte* fileName, int fontSize, int[] fontChars, int charsCount);
+ public static extern Font LoadFontEx(sbyte* fileName, int fontSize, int* fontChars, int glyphCount);
/// Load font from Image (XNA style)
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@@ -1440,19 +1440,19 @@ namespace Raylib_cs
/// Load font from memory buffer, fileType refers to extension: i.e. "ttf"
/// fileData refers to const unsigned char *
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern Font LoadFontFromMemory(sbyte* fileType, byte* fileData, int dataSize, int fontSize, int[] fontChars, int charsCount);
+ public static extern Font LoadFontFromMemory(sbyte* fileType, byte* fileData, int dataSize, int fontSize, int* fontChars, int glyphCount);
/// Load font data for further use
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern GlyphInfo* LoadFontData(byte* fileData, int dataSize, int fontSize, int[] fontChars, int charsCount, FontType type);
+ public static extern GlyphInfo* LoadFontData(byte* fileData, int dataSize, int fontSize, int* fontChars, int glyphCount, FontType type);
/// Generate image font atlas using chars info
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern Image GenImageFontAtlas(GlyphInfo* chars, Rectangle** recs, int charsCount, int fontSize, int padding, int packMethod);
+ public static extern Image GenImageFontAtlas(GlyphInfo* chars, Rectangle** recs, int glyphCount, int fontSize, int padding, int packMethod);
/// Unload font chars info data (RAM)
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void UnloadFontData(GlyphInfo* chars, int charsCount);
+ public static extern void UnloadFontData(GlyphInfo* chars, int glyphCount);
/// Unload Font from GPU memory (VRAM)
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
diff --git a/Raylib-cs/types/Raylib.Utils.cs b/Raylib-cs/types/Raylib.Utils.cs
index 2788663..4d6ab6d 100644
--- a/Raylib-cs/types/Raylib.Utils.cs
+++ b/Raylib-cs/types/Raylib.Utils.cs
@@ -590,10 +590,13 @@ namespace Raylib_cs
}
/// Load font from file with extended parameters
- public static Font LoadFontEx(string fileName, int fontSize, int[] fontChars, int charsCount)
+ public static Font LoadFontEx(string fileName, int fontSize, int[] fontChars, int glyphCount)
{
using var str1 = fileName.ToUTF8Buffer();
- return LoadFontEx(str1.AsPointer(), fontSize, fontChars, charsCount);
+ fixed (int* p = fontChars)
+ {
+ return LoadFontEx(str1.AsPointer(), fontSize, p, glyphCount);
+ }
}
/// Upload vertex data into GPU and provided VAO/VBO ids