Skip to main content

OH_Drawing_FontCountText

Function OH_Drawing_FontCountText 

Source
pub unsafe extern "C" fn OH_Drawing_FontCountText(
    font: *mut OH_Drawing_Font,
    text: *const c_void,
    byteLength: usize,
    encoding: OH_Drawing_TextEncoding,
) -> c_int
Expand description

@brief Obtains the number of glyphs represented by text. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either font or text is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.

@param font Pointer to the {@link OH_Drawing_Font} object. @param text Pointer to the start address of the storage. @param byteLength Text length, in bytes. @param encoding Text encoding type {@link OH_Drawing_TextEncoding}. @return Returns the number of characters represented by the text (non-negative integer) on success; @since 12 @version 1.0