summaryrefslogtreecommitdiffhomepage
path: root/src/rtextures.c
diff options
context:
space:
mode:
authorRay <[email protected]>2022-09-22 20:35:55 +0200
committerRay <[email protected]>2022-09-22 20:35:55 +0200
commit810a0330abdf13c49843692407e2f77da08f8bdc (patch)
treef772f0a7313522b2f1895e77b8fa058a7cb76969 /src/rtextures.c
parent4b1d4b4f6b669b133fab34d9f91ad2f5b898e97a (diff)
downloadraylib-810a0330abdf13c49843692407e2f77da08f8bdc.tar.gz
raylib-810a0330abdf13c49843692407e2f77da08f8bdc.zip
WARNING: Several changes on UTF-8/Codepoints API
- ADDED: `GetCodepointPrevious()` - RENAMED: `GetCodepoint()` -> `GetCodepointNext()`, actually, reimplemented - `GetCodepoint()` has been kept for the moment, for compatibility and also because implementation is different - RENAMED: `TextCodepointsToUTF8()` to `LoadUTF8()`, simpler name and more aligned with raylib conventions (functions loading memory start with Load*()), parameters should be descriptive of functionailty. - ADDED: `UnloadUTF8()`, aligned with `LoadUTF8()` to avoid allocators issues.
Diffstat (limited to 'src/rtextures.c')
-rw-r--r--src/rtextures.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rtextures.c b/src/rtextures.c
index 3badc349..41bd3e18 100644
--- a/src/rtextures.c
+++ b/src/rtextures.c
@@ -1238,8 +1238,8 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co
{
// Get next codepoint from byte string and glyph index in font
int codepointByteCount = 0;
- int codepoint = GetCodepoint(&text[i], &codepointByteCount); // WARNING: Module required: rtext
- int index = GetGlyphIndex(font, codepoint); // WARNING: Module required: rtext
+ int codepoint = GetCodepointNext(&text[i], &codepointByteCount); // WARNING: Module required: rtext
+ int index = GetGlyphIndex(font, codepoint); // WARNING: Module required: rtext
// NOTE: Normally we exit the decoding sequence as soon as a bad byte is found (and return 0x3f)
// but we need to draw all of the bad bytes using the '?' symbol moving one byte