Update rtext.c
This commit is contained in:
parent
6280771dad
commit
bb741f53a8
1 changed files with 4 additions and 3 deletions
|
@ -530,7 +530,7 @@ Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int
|
||||||
Font font = { 0 };
|
Font font = { 0 };
|
||||||
|
|
||||||
char fileExtLower[16] = { 0 };
|
char fileExtLower[16] = { 0 };
|
||||||
strncpy(fileExtLower, TextToLower(fileType), sizeof(fileExtLower) - 1);
|
strncpy(fileExtLower, TextToLower(fileType), 16 - 1);
|
||||||
|
|
||||||
font.baseSize = fontSize;
|
font.baseSize = fontSize;
|
||||||
font.glyphCount = (codepointCount > 0)? codepointCount : 95;
|
font.glyphCount = (codepointCount > 0)? codepointCount : 95;
|
||||||
|
@ -971,7 +971,7 @@ bool ExportFontAsCode(Font font, const char *fileName)
|
||||||
|
|
||||||
// Get file name from path
|
// Get file name from path
|
||||||
char fileNamePascal[256] = { 0 };
|
char fileNamePascal[256] = { 0 };
|
||||||
strcpy(fileNamePascal, TextToPascal(GetFileNameWithoutExt(fileName)));
|
strncpy(fileNamePascal, TextToPascal(GetFileNameWithoutExt(fileName)), 256 - 1);
|
||||||
|
|
||||||
// NOTE: Text data buffer size is estimated considering image data size in bytes
|
// NOTE: Text data buffer size is estimated considering image data size in bytes
|
||||||
// and requiring 6 char bytes for every byte: "0x00, "
|
// and requiring 6 char bytes for every byte: "0x00, "
|
||||||
|
@ -1699,7 +1699,8 @@ const char **TextSplit(const char *text, char delimiter, int *count)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append text at specific position and move cursor!
|
// Append text at specific position and move cursor
|
||||||
|
// WARNING: It's up to the user to make sure appended text does not overflow the buffer!
|
||||||
// REQUIRES: strcpy()
|
// REQUIRES: strcpy()
|
||||||
void TextAppend(char *text, const char *append, int *position)
|
void TextAppend(char *text, const char *append, int *position)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue