15 #include "../../gfx_layout.h" 16 #include "../../string_base.h" 49 static const bool SUPPORTS_RTL =
true;
71 if (buff + 1 <= buffer_last) {
72 buff[0] = (CharType)(((c - 0x010000U) >> 10) + 0xD800);
73 buff[1] = (CharType)(((c - 0x010000U) & 0x3FF) + 0xDC00);
80 *buff = (CharType)(c & 0xFFFF);
bool char_stop
Code point is the start of a grapheme cluster, i.e. a "character".
Implementation of simple mapping class.
String iterator using CoreText as a backend.
std::vector< size_t > utf16_to_utf8
Mapping from UTF-16 code point position to index in the UTF-8 source string.
bool word_stop
Code point is suitable as a word break.
Break info for a character.
virtual void SetString(const char *s)
Set a new iteration string.
void MacOSSetCurrentLocaleName(const char *iso_code)
Store current language locale as a CoreFounation locale.
static size_t AppendToBuffer(CharType *buff, const CharType *buffer_last, WChar c)
Append a wide character to the internal buffer.
Interface to glue fallback and normal layouter into one.
IterType
Type of the iterator.
void MacOSResetScriptCache(FontSize size)
Delete CoreText font reference for a specific font size.
virtual size_t Next(IterType what)
Advance the cursor by one iteration unit.
size_t cur_pos
Current iteration position.
std::vector< CharInfo > str_info
Break information for each code point.
FontSize
Available font sizes.
virtual size_t SetCurPosition(size_t pos)
Change the current string cursor.
Class for iterating over different kind of parts of a string.
UniChar CharType
Helper for GetLayouter, to get the right type.
int MacOSStringCompare(const char *s1, const char *s2)
Compares two strings using case insensitive natural sort.
virtual size_t Prev(IterType what)
Move the cursor back by one iteration unit.
uint32 WChar
Type for wide characters, i.e.
Helper class to construct a new CoreTextParagraphLayout.