From f3a5a6871d4ec005026817e5f2579a6f55938dc2 Mon Sep 17 00:00:00 2001 From: Demizdor Date: Sun, 21 Apr 2019 12:27:46 +0300 Subject: Initial unicode implementation for UTF8 encoded text --- src/raylib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/raylib.h') diff --git a/src/raylib.h b/src/raylib.h index 0afa69d0..6a5f0ef8 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1190,11 +1190,13 @@ RLAPI void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontS RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font RLAPI int GetGlyphIndex(Font font, int character); // Get index position for a unicode character on font +RLAPI int GetNextCodepoint(const char* text, int* count); // Returns next codepoint in a UTF8 encoded `text` or 0x3f(`?`) on failure. `count` will hold the total number of bytes processed. // Text strings management functions // NOTE: Some strings allocate memory internally for returned strings, just be careful! RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending +RLAPI unsigned int TextCountCodepoints(const char *text); // Get total number of characters(codepoints) in a UTF8 encoded `text` until '\0' is found. RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf style) RLAPI const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string RLAPI const char *TextReplace(char *text, const char *replace, const char *by); // Replace text string (memory should be freed!) -- cgit v1.2.3