Go to the documentation of this file.
13 #include "../../gfx_layout.h"
14 #include "../../string_base.h"
69 if (buff + 1 <= buffer_last) {
70 buff[0] = (
CharType)(((c - 0x010000U) >> 10) + 0xD800);
71 buff[1] = (
CharType)(((c - 0x010000U) & 0x3FF) + 0xDC00);
char32_t WChar
Type for wide characters, i.e.
IterType
Type of the iterator.
static const bool SUPPORTS_RTL
Helper for GetLayouter, to get whether the layouter supports RTL.
void MacOSResetScriptCache(FontSize size)
Delete CoreText font reference for a specific font size.
size_t Prev(IterType what) override
Move the cursor back by one iteration unit.
bool char_stop
Code point is the start of a grapheme cluster, i.e. a "character".
static ParagraphLayouter * GetParagraphLayout(CharType *buff, CharType *buff_end, FontMap &fontMapping)
Get the actual ParagraphLayout for the given buffer.
String iterator using CoreText as a backend.
Interface to glue fallback and normal layouter into one.
void SetString(const char *s) override
Set a new iteration string.
Class for iterating over different kind of parts of a string.
static size_t AppendToBuffer(CharType *buff, const CharType *buffer_last, WChar c)
Append a wide character to the internal buffer.
Break info for a character.
void MacOSSetCurrentLocaleName(const char *iso_code)
Store current language locale as a CoreFoundation locale.
std::vector< size_t > utf16_to_utf8
Mapping from UTF-16 code point position to index in the UTF-8 source string.
Helper class to construct a new CoreTextParagraphLayout.
size_t SetCurPosition(size_t pos) override
Change the current string cursor.
UniChar CharType
Helper for GetLayouter, to get the right type.
bool word_stop
Code point is suitable as a word break.
size_t cur_pos
Current iteration position.
size_t Next(IterType what) override
Advance the cursor by one iteration unit.
FontSize
Available font sizes.
int MacOSStringCompare(const char *s1, const char *s2)
Compares two strings using case insensitive natural sort.
void MacOSRegisterExternalFont(const char *file_path)
Register an external font file with the CoreText system.
std::vector< CharInfo > str_info
Break information for each code point.