static String fromUTF8 (const char* utf8buffer, int bufferSizeBytes = -1);
This function will assert on invalid UTF8 data if bufferSizeBytes >= 0 otherwise it will silently accept invalid UTF8. In either case, invalid UTF8 will be stored in the string.
void getGlyphPositions (const String& text, Array<int>& resultGlyphs, Array<float>& xOffsets) override will crash if it is provided an invalid utf8 string.
The return value of auto cfText = text.toCFString(); is not checked for nullptr.
