From 7f4cb93e4f8dd07f1d6277cac99169098c06753b Mon Sep 17 00:00:00 2001 From: mobHot Date: Thu, 13 Mar 2025 10:35:55 +0800 Subject: [PATCH] add the interface of GetRunFont Signed-off-by: mobHot Change-Id: I7f49eb23af1961b7c81f8e4f569a51e86850aea2 --- graphic/graphic_2d/native_drawing/drawing_text_run.h | 11 +++++++++++ .../native_drawing/libnative_drawing.ndk.json | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_run.h b/graphic/graphic_2d/native_drawing/drawing_text_run.h index 8873eaaf2..fafd279a9 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_run.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_run.h @@ -208,6 +208,17 @@ void OH_Drawing_DestroyRunPositions(OH_Drawing_Array* positions); * @since 18 */ uint32_t OH_Drawing_GetRunGlyphCount(OH_Drawing_Run* run); + +/** + * @brief Gets the Font Object of run. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param run Indicates the pointer to an OH_Drawing_Run object. + * @return The Font Object of run. + * @since 20 + * @version 1.0 + */ +OH_Drawing_Font* OH_Drawing_GetRunFont(OH_Drawing_Run* run); #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 e13687d42..c9b0cd789 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1793,5 +1793,9 @@ { "first_introduced": "18", "name": "OH_Drawing_CanvasDrawPixelMapNine" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_GetRunFont" } ] \ No newline at end of file -- Gitee