Commit Graph

179 Commits

Author SHA1 Message Date
Ray
3678c2d157 REMOVE: TRACELOGD(), hardly ever used 2026-01-05 20:47:25 +01:00
Ray
416af51a93 Update year to 2026 2026-01-02 13:40:15 +01:00
Ray
c07d075a63 REVIEWED: Security checks formatting and comments 2026-01-01 16:54:44 +01:00
5a3391fdce [rtext] Fix multiple security vulnerabilities in font loading (#5433, #5434, #5436) (#5450) 2026-01-01 16:35:12 +01:00
Ray
909f040dc5 Remove trailing spaces 2026-01-01 16:33:34 +01:00
Ray
95f72b162b REVIEWED: TextReplace(), revert breaking change, needs to be reviewed again... -WIP- 2025-12-31 22:50:17 +01:00
Ray
20dd4641c8 REVIEWED: Potential security concerns while copying unbounded text data between strings
Note that issue has been reported by CodeQL static analysis system
2025-12-24 19:35:06 +01:00
ddb827fb6f Fixed LoadCodepoints declaring a new local variable shadowing codpoints (#5430) 2025-12-24 08:59:51 +01:00
Ray
e4baf682ab Update rtext.c 2025-12-22 20:30:11 +01:00
Ray
5025009860 REVIEWED: Make sure all variables are initialized on definition, prioritize one line per variable definitions 2025-12-14 19:45:28 +01:00
Ray
c96669e123 REVIEWED: Webpage reference comments starting with REF:, more consistent with TODO: and NOTE: comments 2025-12-13 13:03:41 +01:00
Ray
b465b4e2ea RENAMED: Variable names for consistency, textLength (length in bytes) vs textSize (measure in pixels) 2025-12-11 21:41:25 +01:00
Ray
2853b28d6d REVIEWED: Avoid program crash if GPU data is tried to be loaded before InitWindow() #4751
Following raylib design, a warning log message is shown and program can continue execution.
Some early return checks have been added on most  critical functions.
[rtext] Previous implementation checking `isGpuReady` cross-module variable is not needed any more, resulting in a more decoupled code, load failure is managed at rlgl level
2025-12-11 18:21:57 +01:00
Ray
2a566544d4 ADDED: Multiply security checks to avoid crashes on wrongly provided string data #4751
- REVIEWED: Checking `NULL` input on functions getting `const char *text`, to avoid crashes
- REVIEWED: `strcpy()` usage, prioritize `strncpy()` with limited copy to buffer size
- REPLACED: `strlen()` by `TextLength()` on [rtext] module
- REVIEWED: Replaced some early returns (but keeping others, for easier code following)
2025-12-11 12:59:55 +01:00
944567651c replace sprintf with snprintf (#5382) 2025-12-02 22:49:55 +01:00
1bbc8682f4 Fixed some typos and mispellings (#5381)
Specifically "occured" -> "occurred"
2025-12-02 22:48:06 +01:00
Ray
e1b9857b14 Some TODOs and format reviews 2025-11-23 21:40:39 +01:00
Ray
265fa7833c Update rtext.c 2025-11-19 10:21:16 +01:00
Ray
f21c1cc6ae Update rtext.c 2025-11-19 10:08:42 +01:00
Ray
ec828071ef Update rtext.c 2025-11-19 10:04:01 +01:00
Ray
57e22d5fa0 Update rtext.c 2025-11-18 21:26:26 +01:00
Ray
8ae2c9cf5f FIX: LoadFontDataBDF() #5346 2025-11-12 10:22:56 +01:00
Ray
ec06f9be37 Removed trailing spaces 2025-10-21 13:51:03 +02:00
adfe2c1704 C++ compiler support v2 (#5252)
* Get C++ compilers working

* Fix Formatting
2025-10-15 19:11:44 +02:00
Ray
5dd97ecf2f REVIEWED: TextToPascal(), fix https://github.com/raylibtech/rtools/issues/57 2025-10-07 19:42:05 +02:00
Ray
37149082e8 Avoid warnings 2025-09-29 18:05:16 +02:00
Ray
23e0898c65 Ouch! 2025-09-18 15:51:18 +02:00
Ray
c264c86ee0 ADDED: Some useful functions for Files and Text management
// File management functions
 - int FileRename(const char *fileName, const char *fileRename); // Rename file (if exists)
 - iint FileRemove(const char *fileName);                         // Remove file (if exists)
 - iint FileCopy(const char *srcPath, const char *dstPath);       // Copy file from one path to another, dstPath created if it doesn't exist
 - iint FileMove(const char *srcPath, const char *dstPath);       // Move file from one directory to another, dstPath created if it doesn't exist
 - int FileTextReplace(const char *fileName, const char *search, const char *replacement); // Replace text in an existing file
 - iint FileTextFindIndex(const char *fileName, const char *search); // Find text in existing file

// Text management functions
 - const char *TextRemoveSpaces(const char *text);                                       // Remove text spaces, concat words
 - char *GetTextBetween(const char *text, const char *begin, const char *end);           // Get text between two strings
 - char *TextReplace(const char *text, const char *search, const char *replacement);     // Replace text string (WARNING: memory must be freed!)
 - char *TextReplaceBetween(const char *text, const char *begin, const char *end, const char *replacement); // Replace text between two specific strings (WARNING: memory must be freed!)
2025-09-18 15:34:09 +02:00
Ray
ed8f1a22d1 Remove trailing spaces 2025-09-14 18:07:58 +02:00
Ray
8e52aee853 Update rtext.c 2025-09-05 00:13:32 +02:00
Ray
51aa8776bb Update rtext.c 2025-09-04 23:53:26 +02:00
Ray
0203a47bf9 REDESIGNED: LoadTextLines()/UnloadTextLines() 2025-09-04 23:25:42 +02:00
Ray
2cb387b50a REVIEWED: Font atlas image generation, added some comments #5141 2025-09-03 18:30:00 +02:00
Ray
1fa3c15942 Revert "add const qualifier to the first arg of TextJoin (#5166)"
This reverts commit 4e8d08523f.
2025-09-02 19:00:22 +02:00
4e8d08523f add const qualifier to the first arg of TextJoin (#5166)
* add const qualifier to the first arg of TextJoin

* Update raylib_api.* by CI

* Update raylib.h

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ray <raysan5@gmail.com>
2025-09-02 18:58:39 +02:00
Ray
29ce5d8aa9 WARNING: BREAKING: LoadFontData() redesigned, added parameter
This redesign is a big improvement on font loading time and memory requirements. It only loads glyphs available on font from requested codepoints and only processes those glyphs for packaging. When processing +10K codepoints (CJK), the loading time improves considerably.
2025-09-02 17:45:39 +02:00
Ray
8f32c502a7 REVIEWED: Code sections definition 2025-09-02 12:10:40 +02:00
Ray
1777da9056 REVIEWED: Avoid realloc() calls, small security improvement 2025-09-01 20:37:23 +02:00
Ray
0a92c863c4 Reverted const codepoints to avoid warnings 2025-09-01 11:27:11 +02:00
Ray
edce3d41b2 REVERT: Making codepoints const, variable is used to generate list in case it was NULL 2025-08-31 12:11:03 +02:00
Ray
ecedf40da6 REVIEW: const for codepoints arrays passed to function #5159 2025-08-31 11:39:14 +02:00
Ray
d2f6c4924c ADDED: [rtext] LoadTextLines()/UnloadTextLines() 2025-08-26 10:17:33 +02:00
Ray
52980c947d REVIEWED: [rtext] Provide more detailed info on glyphs failing to pack #5141 2025-08-24 11:07:55 +02:00
3c9c66e72b use RL_MALLOC in stb_truetype 2025-08-23 13:10:27 +03:00
Ray
570082deba WARNING: **NEW** raylib code CONVENTION: Comments do not end with '.' 2025-08-07 18:23:20 +02:00
Ray
7b017b60d9 Move global variable to right code section 2025-07-21 10:57:21 +02:00
3d93b30262 Update font load message 2025-07-18 15:20:38 +02:00
Ray
59bcf680aa Code gardening... 2025-06-07 20:14:24 +02:00
Ray
5ddd13b775 REVIEWED: Hexadecimal formatting to be consistent 2025-05-28 17:18:02 +02:00
Ray
9d4c31533d Update rtext.c 2025-05-14 23:47:03 +02:00