/* Give the size of an UTF-8 coded character  */
static uint8_t lv_text_utf8_size(const char *str)
/* Give the size of an UTF-8 coded character  */
static uint8_t lv_text_utf8_size(const char *str)
{
    if(LV_IS_ASCII(str[0]))
        return 1;
    else if(LV_IS_2BYTES_UTF8_CODE(str[0]))
        return 2;
    else if(LV_IS_3BYTES_UTF8_CODE(str[0]))
        return 3;
    else if(LV_IS_4BYTES_UTF8_CODE(str[0]))
        return 4;
    return 0;
}