inline CodePoints UTF8ToCodePoints( const char* c_str, std::size_t length ) { CodePoints result; UTF8ToCodePoints(c_str, length, result); return result; }
inline CodePoints UTF8ToCodePoints( const char* begin, const char* end ) { CodePoints result; UTF8ToCodePoints(begin, end, result); return result; }
Layout MakeLayout(const Font& font, StrCRef str) { CodePoints cps; UTF8ToCodePoints(str.begin(), str.size(), cps); Layout layout(MakeLayout(font, str.size())); layout.Set(cps.data(), cps.size()); return std::move(layout); }
Layout MakeLayout( const Font& font, const GLchar* c_str, std::size_t size ) { std::vector<CodePoint> cps; UTF8ToCodePoints(c_str, size, cps); Layout layout(MakeLayout(font, size)); layout.Set(cps); return std::move(layout); }
void Set(StrCRef str) { Set(UTF8ToCodePoints(str.begin(), str.size())); }
void Set(const String& str) { Set(UTF8ToCodePoints(str.c_str(), str.size())); }
void Set(const StrLit& lit) { Set(UTF8ToCodePoints(lit.c_str(), lit.size())); }
inline CodePoints UTF8ToCodePoints(const char (&c_str_lit)[N]) { CodePoints result; UTF8ToCodePoints(c_str_lit, N>0?N-1:0, result); return result; }