diff options
| author | jussi | 2024-01-28 13:10:18 +0200 |
|---|---|---|
| committer | jussi | 2024-01-28 13:10:18 +0200 |
| commit | 71cc89c3033365746e5dcdb933c460c8e0da7fb0 (patch) | |
| tree | 4b08b5c379991894bb4aae974f22150841aa5204 /API.md | |
| parent | 3b3d0ad32e24c2ff0a13daf3e865054f63afaf86 (diff) | |
| download | reilua-enhanced-71cc89c3033365746e5dcdb933c460c8e0da7fb0.tar.gz reilua-enhanced-71cc89c3033365746e5dcdb933c460c8e0da7fb0.tar.bz2 reilua-enhanced-71cc89c3033365746e5dcdb933c460c8e0da7fb0.zip | |
Text codepoints management functions.
Diffstat (limited to 'API.md')
| -rw-r--r-- | API.md | 64 |
1 files changed, 62 insertions, 2 deletions
@@ -6470,7 +6470,7 @@ Get glyph index position in font for a codepoint (unicode character), fallback t > glyphInfo = RL.GetGlyphInfo( Font font, int codepoint ) -Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found +Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found. Return as lightuserdata - Success return GlyphInfo @@ -6478,7 +6478,7 @@ Get glyph font info data for a codepoint (unicode character), fallback to '?' if > glyphInfo = RL.GetGlyphInfoByIndex( Font font, int index ) -Get glyph font info data by index +Get glyph font info data by index. Return as lightuserdata - Failure return nil - Success return GlyphInfo @@ -6608,6 +6608,66 @@ Get glyphInfo character image data. Return as lightuserdata --- +## Text - Text codepoints management functions (unicode characters) + +--- + +> string = RL.LoadUTF8( int{} codepoints ) + +Load UTF-8 text encoded from codepoints array + +- Success return string + +--- + +> codepoints = RL.LoadCodepoints( string text ) + +Load all codepoints from a UTF-8 text string + +- Success return int{} + +--- + +> count = RL.GetCodepointCount( string text ) + +Get total number of codepoints in a UTF-8 encoded string + +- Success return int + +--- + +> codepoint, codepointSize = RL.GetCodepoint( string text ) + +Get codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure + +- Success return int, int + +--- + +> codepoint, codepointSize = RL.GetCodepointNext( string text ) + +Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure + +- Success return int, int + +--- + +> codepoint, codepointSize = RL.GetCodepointPrevious( string text ) + +Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure + +- Success return int, int + +--- + +> string, utf8Size = RL.CodepointToUTF8( int codepoint ) + +Encode one codepoint into UTF-8 byte array + +- Success return string, int + +--- + ## Models - Basic geometric 3D shapes drawing functions --- |
