211 Commits

Author SHA1 Message Date
Ray f9c41a0866 Reemove trailing spaces 2026-06-16 21:12:12 +02:00
Ray aebfd788c7 WARNING: BREAKING: REDESIGNED: ImageDraw() API, align with DrawTexture() 2026-06-07 21:53:07 +02:00
Ray 15d25242be REVIEWED: Comments to be more descriptive 2026-06-07 18:41:44 +02:00
Ray 2c690425c9 Reviewed comments, remove article usage 2026-06-03 21:02:59 +02:00
Ray cef7718468 RENAMED: Some Rectangle parameters with more descriptive names 2026-06-03 20:16:12 +02:00
Thomas Anderson fd28dc5644 [rtext] add warning for loadfontex/loadfontfrommemory (#5864)
* add warning for loadfontex/loadfontfrommemory

* bump to re-run build tests
2026-05-13 08:56:13 +02:00
Ray 72a341a37f Update rtext.c 2026-04-27 12:34:43 +02:00
Ray 06621eb3b7 REVIEWED: Comments for consistency and spelling 2026-04-27 11:34:58 +02:00
Ray 96e30549f5 Align default values on comments for config variables 2026-04-16 00:05:23 +02:00
Thomas Anderson 0decdcd497 update defines for new format etc (#5760) 2026-04-15 12:20:51 +02:00
Ray da93ec4a21 Remove trailing spaces 2026-03-29 01:17:25 +01:00
Ray 8c44ea5032 Code gardening
REVIEWED: Some early returns, avoid if possible
REVIEWED: Some return variable names, for consistency, rename `success` to `result`
2026-03-29 00:37:01 +01:00
Ray 8a7aff509d WARNING: BREAKING: REDESIGNED: TextInsert(), TextReplace(), TextReplaceBetween(), using static buffers
Redesign has been conditioned by the usage of those functions on `rexm`, `rpc` and other tools; for many use cases a static buffer is enough and way more comfortable to use.
ADDED: `TextInsertAlloc()`, `TextReplaceAlloc()`, `TextReplaceBetweenAlloc()`, alternatives with internal allocations
2026-03-27 21:56:29 +01:00
Ray 0f0983c065 Remove trailing spaces 2026-03-25 16:51:02 +01:00
Ray 6ba6df3af3 Remove trailing spaces 2026-03-13 18:50:26 +01:00
Thomas Anderson f9ea607385 fix error in textinsert, found by github user chrg127 (#5644) 2026-03-12 11:38:06 +01:00
Ray 99cab6d3a7 Update rtext.c 2026-03-06 17:11:48 +01:00
JoeStrout c8d1f3e750 Make LoadFontFromImage limit its scanning to image dimensions. (#5626) 2026-03-06 16:52:58 +01:00
moe li 02b592cd7b [rtext] Add MeasureTextCodepoints() for direct measurement of codepoints (#5623)
* Measuring length of an array of codepoints

* Applied style changes and removed default measurement function
2026-03-05 11:49:57 +01:00
Ray faf42366ec Code gardening 2026-03-04 01:14:26 +01:00
Ray 5ada84cc6d Update rtext.c 2026-03-04 00:13:47 +01:00
Ray b4746469d4 Formating review, using imperative mode in comments 2026-03-03 22:40:34 +01:00
moe li f583674327 fix memory corruption in GenImageFontAtlas reallocation (#5602) 2026-02-27 08:36:46 +01:00
Ray 5361265a7d WARNING: BREAKING: REDESIGNED: raylib build features config system #4411 #4554
Redesigned to support disabling features on compilation with `-DSUPPORT_FEATURE=0`
REMOVED: `SUPPORT_DEFAULT_FONT`, always supported
REMOVED: `SUPPORT_IMAGE_MANIPULATION `, always supported
REMOVED: `SUPPORT_TEXT_MANIPULATION`, always supported
REDESIGNED: `SUPPORT_FONT_ATLAS_WHITE_REC` to `FONT_ATLAS_CORNER_REC_SIZE`
REVIEWED: Config values (other than 0-1) are already defined on respective modules
Other config tweaks here and there
2026-02-26 08:19:28 +01:00
Ray 2454b3ed4b REVIEWED: TextReplace() and TextLength(), avoid using strcpy() 2026-02-20 16:27:08 +01:00
Ray 90dd9aef72 REVIEWED: GenImageFontAtlas(), no need for the conservative approach flag 2026-02-19 17:40:22 +01:00
Ray 97023def48 REVIEWED: GenImageFontAtlas(), scale image to fit all characters, in case it fails size estimation #5542 2026-02-17 18:45:14 +01:00
Ray 070082f8c9 REVIEWED: Comments to impersonal format 2026-02-12 18:55:40 +01:00
ssszcmawo 3568b6e293 [rtext] Fix and enhance TextReplace() function (#5511)
* add check for replacement,replace strcpy,strncpy with memcpy

* add 4 spaces in if statement

* add spaces
2026-01-26 12:04:22 +01:00
Ray 0df2fe981b REVIEWED: ExportFontAsCode() #5497 2026-01-15 10:42:58 +01:00
Ray 0c33c603f4 REVIEWED: EXTERNAL_CONFIG_FLAGS usage, check moved to config.h
Due to `utils` module removal, `EXTERNAL_CONFIG_FLAGS` was not working, so the system was redesigned.
This change is independent of #4411
2026-01-12 13:04:38 +01:00
Ray dd7a1948f1 WARNING: REDESIGN: REMOVED: utils module, functionality moved to rcore module: logging and file-system #4551
[utils] was created long time ago, when [rcore] contained all the platforms code, the purpose of the file was exposing basic filesystem functionality across modules and also logging mechanism but many things have changed since then and there is no need to keep using this module.

 - Logging system has been move to [rcore] module and macros are exposed through `config.h` to other modules
 - File system functionality has also been centralized in [rcore] module that along the years it was already adding more and more file-system functions, now they are all in the same module
 - Android specific code has been moved to `rcore_android.c`, it had no sense to have specific platform code in `utils`, [rcore] is responsible of all platform code.
2026-01-10 12:13:07 +01:00
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
GlitchLens 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
Kivi 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
Connor O'Connor 944567651c replace sprintf with snprintf (#5382) 2025-12-02 22:49:55 +01:00
Connor O'Connor 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