From 8fc1e5174908e6d55e8effc703507b0e72a8bbad Mon Sep 17 00:00:00 2001 From: PengKejie Date: Wed, 12 Mar 2025 17:25:37 +0800 Subject: [PATCH] add interface OH_Drawing_TypographyHandlerAddEncodeText Signed-off-by: PengKejie --- .../native_drawing/drawing_text_typography.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 966621728..61d360639 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -975,6 +975,20 @@ void OH_Drawing_TypographyHandlerPushTextStyle(OH_Drawing_TypographyCreate* hand */ void OH_Drawing_TypographyHandlerAddText(OH_Drawing_TypographyCreate* handler, const char* text); +/** + * @brief Sets the text content. The content supports UTF-8, UTF-16, and UTF-32 formats. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param handler Indicates the pointer to an OH_Drawing_TypographyCreate object. + * @param text Indicates the pointer to the text content to set. + * @param byteLength Set the byte length of the text content. + * @param textEncodeType Indicates the text encoding type OH_Drawing_TextEncoding. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_TypographyHandlerAddEncodeText(OH_Drawing_TypographyCreate* handler, const void* text, + size_t byteLength, OH_Drawing_TextEncoding textEncodeType); + /** * @brief Removes the topmost style in the stack, leaving the remaining styles in effect. * -- Gitee