diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 9666217288d549c081114e2ed343c13d6a8f6973..6908a27f4320584aad52017abd8899bed6f30729 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -634,6 +634,23 @@ typedef struct { char** families; } OH_Drawing_StrutStyle; +/** + * @brief The fall back font style of text. + * + * @since 20 + * @version 1.0 + */ +enum OH_Drawing_TextFallBackFontStyle { + /*default font style*/ + TEXT_FONT_FALL_BACK_NORMAL, + /*serif font font style*/ + TEXT_FONT_FALL_BACK_SERIF, + /*sans serif font style*/ + TEXT_FONT_FALL_BACK_SANS, + /*monospaced font style*/ + TEXT_FONT_FALL_BACK_MONO +}; + /** * @brief Creates an OH_Drawing_TypographyStyle object. * @@ -2888,6 +2905,17 @@ float OH_Drawing_GetTextTabLocation(OH_Drawing_TextTab* tab); */ void OH_Drawing_SetTypographyTextTab(OH_Drawing_TypographyStyle* style, OH_Drawing_TextTab* tab); +/** + * @brief Sets the fall back font style of OH_Drawing_TextStyle object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param fallBackFontStyle Indicates the fall back font style to set. For details, see the enum OH_Drawing_TextFallBackFontStyle. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_SetTextStyleFallBackFontStyle(OH_Drawing_TextStyle* style, OH_Drawing_TextFallBackFontStyle fallBackFontStyle); + /** * @brief Get DrawingArray size. *