/* Give the size of an UTF-8 coded character  */
static uint8_t lv_txt_utf8_size(const char *str)
/* Give the size of an UTF-8 coded character  */
static uint8_t lv_txt_utf8_size(const char *str)
{
    if((str[0] & 0x80) == 0)
        return 1;
    else if((str[0] & 0xE0) == 0xC0)
        return 2;
    else if((str[0] & 0xF0) == 0xE0)
        return 3;
    else if((str[0] & 0xF8) == 0xF0)
        return 4;
    return 1;
}