diff options
| author | Demizdor <avalorrian@gmail.com> | 2019-04-21 12:27:46 +0300 |
|---|---|---|
| committer | Demizdor <avalorrian@gmail.com> | 2019-04-21 12:27:46 +0300 |
| commit | f3a5a6871d4ec005026817e5f2579a6f55938dc2 (patch) | |
| tree | 824844999de400efeca863d7b0051018dc6f1536 /src/raylib.h | |
| parent | 8c22f685d168000eabfc994a09c3a2a61f7f633f (diff) | |
| download | raylib-f3a5a6871d4ec005026817e5f2579a6f55938dc2.tar.gz raylib-f3a5a6871d4ec005026817e5f2579a6f55938dc2.zip | |
Initial unicode implementation for UTF8 encoded text
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 2 |
1 files changed, 2 insertions, 0 deletions
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!) |
