diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 9666217288d549c081114e2ed343c13d6a8f6973..c6f3c2d54a465184141c6377639ba4ba5ea87670 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -2899,6 +2899,18 @@ void OH_Drawing_SetTypographyTextTab(OH_Drawing_TypographyStyle* style, OH_Drawi */ size_t OH_Drawing_GetDrawingArraySize(OH_Drawing_Array* drawingArray); +/** + * @brief Sets whether to optimize whitespace at the end of each line for text typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param trailingSpaceOptimized Boolean value indicating whether to optimize whitespace at the end of each line + * for text typography to set. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_SetTypographyTextTrailingSpaceOptimized(OH_Drawing_TypographyStyle* style, bool trailingSpaceOptimized); + #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 3af5dfe2e28b96310fa8ebaf07d3edbb8d9ffc49..5f661fe58b87a721ff05dfa62c85d52a64af9f47 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1817,5 +1817,9 @@ { "first_introduced": "18", "name": "OH_Drawing_CanvasDrawPixelMapNine" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_SetTypographyTextTrailingSpaceOptimized" } ] \ No newline at end of file