Skip to content

Commit edce3d4

Browse files
committed
REVERT: Making codepoints const, variable is used to generate list in case it was NULL
1 parent f2adb02 commit edce3d4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/raylib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ RLAPI Font LoadFontEx(const char *fileName, int fontSize, const int *codepoints,
14701470
RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
14711471
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
14721472
RLAPI bool IsFontValid(Font font); // Check if a font is valid (font data loaded, WARNING: GPU texture not checked)
1473-
RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount, int type); // Load font data for further use
1473+
RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use
14741474
RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
14751475
RLAPI void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
14761476
RLAPI void UnloadFont(Font font); // Unload font from GPU memory (VRAM)

src/rtext.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static int textLineSpacing = 2; // Text vertical line spacing in
147147
static Font LoadBMFont(const char *fileName); // Load a BMFont file (AngelCode font file)
148148
#endif
149149
#if defined(SUPPORT_FILEFORMAT_BDF)
150-
static GlyphInfo *LoadFontDataBDF(const unsigned char *fileData, int dataSize, const int *codepoints, int codepointCount, int *outFontSize);
150+
static GlyphInfo *LoadFontDataBDF(const unsigned char *fileData, int dataSize, int *codepoints, int codepointCount, int *outFontSize);
151151
#endif
152152

153153
#if defined(SUPPORT_DEFAULT_FONT)
@@ -620,7 +620,7 @@ bool IsFontValid(Font font)
620620

621621
// Load font data for further use
622622
// NOTE: Requires TTF font memory data and can generate SDF data
623-
GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount, int type)
623+
GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type)
624624
{
625625
// NOTE: Using some SDF generation default values,
626626
// trades off precision with ability to handle *smaller* sizes
@@ -2392,7 +2392,7 @@ static unsigned char HexToInt(char hex)
23922392

23932393
// Load font data for further use
23942394
// NOTE: Requires BDF font memory data
2395-
static GlyphInfo *LoadFontDataBDF(const unsigned char *fileData, int dataSize, const int *codepoints, int codepointCount, int *outFontSize)
2395+
static GlyphInfo *LoadFontDataBDF(const unsigned char *fileData, int dataSize, int *codepoints, int codepointCount, int *outFontSize)
23962396
{
23972397
#define MAX_BUFFER_SIZE 256
23982398

0 commit comments

Comments
 (0)