lv_text_ap.h
API reference for lv_text_ap.h
Functions
lv_text_ap_strlen
Calculate the number of bytes required to store the Arabic/Persian processed version of a UTF-8 string, excluding the null terminator. Analogous to strlen() but accounts for character form substitutions (e.g. initial, medial, final, isolated forms).
size_t lv_text_ap_strlen(const char *txt)| Name | Type | Description |
|---|---|---|
txt | const char * | Null-terminated UTF-8 input string. Must not be NULL. |
Returns: size_t — Number of bytes in the processed output, excluding '\0'. Allocate (lv_text_ap_strlen(txt) + 1) bytes for the output buffer.
lv_text_ap_proc
Process a UTF-8 string and replace Arabic/Persian characters with their correct contextual forms (isolated, initial, medial, final) based on their position within each word.
The output buffer must be pre-allocated with at least (lv_text_ap_strlen(txt) + 1) bytes.
Returns early if txt or txt_out are null
void lv_text_ap_proc(const char *txt, char *txt_out)| Name | Type | Description |
|---|---|---|
txt | const char * | Null-terminated UTF-8 input string. |
txt_out | char * | Output buffer to write the processed UTF-8 string into. Must not overlap with txt. |
Non-Arabic/Persian characters are copied to the output unchanged.
Macros
LV_UNDEF_ARABIC_PERSIAN_CHARS
#define LV_UNDEF_ARABIC_PERSIAN_CHARS (UINT32_MAX)LV_AP_ALPHABET_BASE_CODE
#define LV_AP_ALPHABET_BASE_CODE 0x0622LV_AP_END_CHARS_LIST
#define LV_AP_END_CHARS_LIST {0,0,0,0,0,{0,0}}Dependencies
Indirect dependencies
lv_anim.hlv_area.hlv_array.hlv_assert.hlv_bidi.hlv_color.hlv_color_op.hlv_conf_internal.hlv_conf_kconfig.hlv_draw_buf.hlv_event.hlv_ext_data.hlv_flex.hlv_font.hlv_fs.hlv_grad.hlv_grid.hlv_image_decoder.hlv_image_dsc.hlv_layout.hlv_ll.hlv_log.hlv_math.hlv_matrix.hlv_mem.hlv_palette.hlv_profiler.hlv_profiler_builtin.hlv_sprintf.hlv_string.hlv_style.hlv_style_gen.hlv_symbol_def.hlv_tick.hlv_timer.h
How is this guide?
Last updated on