From 88857447ce3233abcd558f3e5af52d151ea0d9fb Mon Sep 17 00:00:00 2001 From: changleipeng Date: Fri, 29 Mar 2024 17:24:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=90=88=E5=B9=B6405=20445=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: changleipeng --- graphic/graphic_2d/native_drawing/BUILD.gn | 2 + .../native_drawing/drawing_font_mgr.h | 230 ++++++ .../native_drawing/drawing_text_typography.h | 714 +++++++++++++++++- .../graphic_2d/native_drawing/drawing_types.h | 16 + .../native_drawing/libnative_drawing.ndk.json | 256 ++++++- 5 files changed, 1207 insertions(+), 11 deletions(-) create mode 100644 graphic/graphic_2d/native_drawing/drawing_font_mgr.h diff --git a/graphic/graphic_2d/native_drawing/BUILD.gn b/graphic/graphic_2d/native_drawing/BUILD.gn index 493714389d5..89df5755086 100644 --- a/graphic/graphic_2d/native_drawing/BUILD.gn +++ b/graphic/graphic_2d/native_drawing/BUILD.gn @@ -26,6 +26,7 @@ ohos_ndk_headers("native_drawing_header") { "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_filter.h", "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_font.h", "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_font_collection.h", + "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_font_mgr.h", "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_image.h", "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_mask_filter.h", "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_matrix.h", @@ -64,6 +65,7 @@ ohos_ndk_library("libnative_drawing_ndk") { "native_drawing/drawing_filter.h", "native_drawing/drawing_font.h", "native_drawing/drawing_font_collection.h", + "native_drawing/drawing_font_mgr.h", "native_drawing/drawing_mask_filter.h", "native_drawing/drawing_matrix.h", "native_drawing/drawing_memory_stream.h", diff --git a/graphic/graphic_2d/native_drawing/drawing_font_mgr.h b/graphic/graphic_2d/native_drawing/drawing_font_mgr.h new file mode 100644 index 00000000000..d74fbbf3140 --- /dev/null +++ b/graphic/graphic_2d/native_drawing/drawing_font_mgr.h @@ -0,0 +1,230 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef C_INCLUDE_DRAWING_FONT_MGR_H +#define C_INCLUDE_DRAWING_FONT_MGR_H + +/** + * @addtogroup Drawing + * @{ + * + * @brief Provides functions such as 2D graphics rendering, text drawing, and image display. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * + * @since 12 + * @version 1.0 + */ + +/** + * @file drawing_font_mgr.h + * + * @brief Declares functions related to the fontmgr object in the drawing module. + * + * @since 12 + * @version 1.0 + */ + +#include "drawing_types.h" +#include "drawing_text_typography.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Creates an OH_Drawing_FontMgr object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @return Returns the pointer to the OH_Drawing_FontMgr object created. + * @since 12 + * @version 1.0 + */ +OH_Drawing_FontMgr* OH_Drawing_FontMgrCreate(void); + +/** + * @brief Releases the memory occupied by an OH_Drawing_FontMgr object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_FontMgrDestroy(OH_Drawing_FontMgr*); + +/** + * @brief Gets the count of font families. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @return Returns the count of font families. + * @since 12 + * @version 1.0 + */ +int OH_Drawing_FontMgrGetFamilyCount(OH_Drawing_FontMgr*); + +/** + * @brief Gets the font family name by the index. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @param index Indicates the index to get the font family name. + * @return Returns the font family name corresponding to the index value. + * @since 12 + * @version 1.0 + */ +char* OH_Drawing_FontMgrGetFamilyName(OH_Drawing_FontMgr*, int index); + +/** + * @brief Releases the memory occupied by font family name. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param familyName Indicates the font family name. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_FontMgrDestroyFamilyName(char* familyName); + +/** + * @brief Creates an OH_Drawing_FontStyleSet object by OH_Drawing_FontMgr object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @param index Indicates the index used to get the font style set object from the font manager object. + * @return Returns the pointer to the OH_Drawing_FontStyleSet object created. + * @since 12 + * @version 1.0 + */ +OH_Drawing_FontStyleSet* OH_Drawing_FontMgrCreateFontStyleSet(OH_Drawing_FontMgr*, int index); + +/** + * @brief Releases the memory occupied by an OH_Drawing_FontStyleSet object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_FontMgrDestroyFontStyleSet(OH_Drawing_FontStyleSet*); + +/** + * @brief Get the pointer to an OH_Drawing_FontStyleSet object for the given font style set family name. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @param familyName Indicates the family name of a font style set to be matched. + * @return Returns the pointer to the OH_Drawing_FontStyleSet object matched. + * @since 12 + * @version 1.0 + */ +OH_Drawing_FontStyleSet* OH_Drawing_FontMgrMatchFamily(OH_Drawing_FontMgr*, const char* familyName); + +/** + * @brief Get the pointer to an OH_Drawing_Typeface object based on the given font style and family name. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @param familyName Indicates the family name of a font style set to be matched. + * @param OH_Drawing_FontStyleStruct Indicates an OH_Drawing_FontStyleStruct object. + * @return Returns the pointer to the OH_Drawing_Typeface object matched. + * @since 12 + * @version 1.0 + */ +OH_Drawing_Typeface* OH_Drawing_FontMgrMatchFamilyStyle(OH_Drawing_FontMgr*, + const char* familyName, OH_Drawing_FontStyleStruct fontStyle); + +/** + * @brief Get the pointer to an OH_Drawing_Typeface object for the given character. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontMgr Indicates the pointer to an OH_Drawing_FontMgr object. + * @param familyName Indicates the family name of a font style set to be matched. + * @param OH_Drawing_FontStyleStruct Indicates an OH_Drawing_FontStyleStruct object. + * @param bcp47 Indicates an array of languages which indicate the language of character. + * @param bcp47Count Indicates the array size of bcp47. + * @param character Indicates a UTF8 value to be matched. + * @return Returns the pointer to the OH_Drawing_Typeface object matched. + * @since 12 + * @version 1.0 + */ +OH_Drawing_Typeface* OH_Drawing_FontMgrMatchFamilyStyleCharacter(OH_Drawing_FontMgr*, const char* familyName, + OH_Drawing_FontStyleStruct fontStyle, const char* bcp47[], int bcp47Count, int32_t character); + +/** + * @brief Create a typeface for the given index. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. + * @param index Indicates the index of the typeface in this fontStyleSet. + * @return If successful, return a pointer to OH_Drawing_Typeface object; if failed, return nullptr. + * @since 12 + * @version 1.0 + */ +OH_Drawing_Typeface* OH_Drawing_FontStyleSetCreateTypeface(OH_Drawing_FontStyleSet*, int index); + + /** + * @brief Get font style for the specified typeface. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. + * @param index Indicates the index of the typeface in this fontStyleSet. + * @param styleName Indicates the style name returned. + * @return Return the OH_Drawing_FontStyleStruct structure. + * @since 12 + * @version 1.0 + */ +OH_Drawing_FontStyleStruct OH_Drawing_FontStyleSetGetStyle(OH_Drawing_FontStyleSet*, int32_t index, + char** styleName); + + /** + * @brief Releases the memory styleName string. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param styleName Indicates the pointer to a string type. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_FontStyleSetFreeStyleName(char** styleName); + +/** + * @brief Get the closest matching typeface. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. + * @param fontStyleStruct Indicates the OH_Drawing_FontStyleStruct structure. + * @return A pointer to matched OH_Drawing_Typeface. + * @since 12 + * @version 1.0 + */ +OH_Drawing_Typeface* OH_Drawing_FontStyleSetMatchStyle(OH_Drawing_FontStyleSet*, + OH_Drawing_FontStyleStruct fontStyleStruct); + +/** + * @brief Get the count of typeface. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontStyleSet Indicates the pointer to an OH_Drawing_FontStyleSet object. + * @return The count of typeface in this font style set. + * @since 12 + * @version 1.0 + */ +int OH_Drawing_FontStyleSetCount(OH_Drawing_FontStyleSet*); + +#ifdef __cplusplus +} +#endif +/** @} */ +#endif \ No newline at end of file diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 90c0ebb964a..b095c22e6c8 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -147,6 +147,8 @@ enum OH_Drawing_FontStyle { FONT_STYLE_NORMAL, /** Italic style */ FONT_STYLE_ITALIC, + /** Oblique style */ + FONT_STYLE_OBLIQUE, }; /** @@ -287,6 +289,126 @@ typedef enum { RECT_WIDTH_STYLE_MAX, } OH_Drawing_RectWidthStyle; +/** + * @brief Gets system font configuration information list result enum. + * + * @since 12 + * @version 1.0 + */ +enum OH_Drawing_FontConfigInfoErrorCode { + /** The list of system font configuration information was successfully obtained */ + SUCCESS_FONT_CONFIG_INFO = 0, + /** Unknown error */ + ERROR_FONT_CONFIG_INFO_UNKNOWN = 1, + /** Parse system config file error */ + ERROR_FONT_CONFIG_INFO_PARSE_FILE = 2, + /** Alloc memory error */ + ERROR_FONT_CONFIG_INFO_ALLOC_MEMORY = 3, + /** Copy string data error */ + ERROR_FONT_CONFIG_INFO_COPY_STRING_DATA = 4, +}; + +/** + * @brief Fallback font information. + * + * @since 12 + * @version 1.0 + */ +typedef struct OH_Drawing_FontFallbackInfo { + /** The type of language supported by the font set. The language format is bcp47 */ + char* language; + /** Font family name */ + char* familyName; +} OH_Drawing_FontFallbackInfo; + +/** + * @brief Fallback font group. + * + * @since 12 + * @version 1.0 + */ +typedef struct OH_Drawing_FontFallbackGroup { + /** + * The name of the font set corresponding to the fallback font set. If the value is null, + * all fonts can be set using the fallback font set list. + */ + char* groupName; + /** Fallback font Info Size */ + size_t fallbackInfoSize; + /** A list of font sets for fallback fonts */ + OH_Drawing_FontFallbackInfo* fallbackInfoSet; +} OH_Drawing_FontFallbackGroup; + +/** + * @brief Font weight mapping information. + * + * @since 12 + * @version 1.0 + */ +typedef struct OH_Drawing_FontAdjustInfo { + /** The font's original weight value */ + int weight; + /** The font weight displayed in the application */ + int to; +} OH_Drawing_FontAdjustInfo; + +/** + * @brief Alias font information. + * + * @since 12 + * @version 1.0 + */ +typedef struct OH_Drawing_FontAliasInfo { + /** Font family name */ + char* familyName; + /** + * Font weight value. When the weight value is greater than 0, + * the font set contains only fonts with the specified weight. + * When the weight value is equal to 0, the font set contains all fonts. + */ + int weight; +} OH_Drawing_FontAliasInfo; + +/** + * @brief General font set information supported by the system. + * + * @since 12 + * @version 1.0 + */ +typedef struct OH_Drawing_FontGenericInfo { + /** Font family name */ + char* familyName; + /** The size of alias font lists */ + size_t aliasInfoSize; + /** The size of font weight mapping information lists */ + size_t adjustInfoSize; + /** List of alias fonts */ + OH_Drawing_FontAliasInfo* aliasInfoSet; + /** Font weight mapping information lists */ + OH_Drawing_FontAdjustInfo* adjustInfoSet; +} OH_Drawing_FontGenericInfo; + +/** + * @brief System font configuration information. + * + * @since 12 + * @version 1.0 + */ +typedef struct OH_Drawing_FontConfigInfo { + /** Count of system font file paths */ + size_t fontDirSize; + /** List size of generic font sets */ + size_t fontGenericInfoSize; + /** Count of fallback font set lists */ + size_t fallbackGroupSize; + /** List of system font file paths */ + char** fontDirSet; + /** List of generic font sets */ + OH_Drawing_FontGenericInfo* fontGenericInfoSet; + /** List of fallback font sets */ + OH_Drawing_FontFallbackGroup* fallbackGroupSet; +} OH_Drawing_FontConfigInfo; + /** * @brief Describes the font information. * @@ -353,6 +475,92 @@ typedef struct OH_Drawing_LineMetrics { OH_Drawing_Font_Metrics firstCharMetrics; } OH_Drawing_LineMetrics; +/** + * @brief Enumerates of heightmode of text. + * + * @since 12 + * @version 1.0 + */ +enum OH_Drawing_TextHeightBehavior { + /** both ascend of first row and last row style */ + TEXT_HEIGHT_ALL = 0x0, + /** forbidding ascend of first row style*/ + TEXT_HEIGHT_DISABLE_FIRST_ASCENT = 0x1, + /** forbidding ascend of last row style */ + TEXT_HEIGHT_DISABLE_LAST_ASCENT = 0x2, + /** neither ascend of first row nor last row style */ + TEXT_HEIGHT_DISABLE_ALL = 0x1 | 0x2, +}; + +/** + * @brief Enumerates text style type. + * + * @since 12 + * @version 1.0 + */ +enum OH_Drawing_TextStyleType { + /** None style */ + TEXT_STYLE_NONE, + /** All attributes style */ + TEXT_STYLE_ALL_ATTRIBUTES, + /** Font style */ + TEXT_STYLE_FONT, + /** Foreground style */ + TEXT_STYLE_FOREGROUND, + /** Background style */ + TEXT_STYLE_BACKGROUND, + /** Shadow style */ + TEXT_STYLE_SHADOW, + /** Decorations style */ + TEXT_STYLE_DECORATIONS, + /** Letter spacing style */ + TEXT_STYLE_LETTER_SPACING, + /** Word spacing style */ + TEXT_STYLE_WORD_SPACING +}; + +/** + * @brief Enumerates font width. + * + * @since 12 + * @version 1.0 + */ +enum OH_Drawing_FontWidth { + /* Ultra condensed font width */ + FONT_WIDTH_ULTRA_CONDENSED = 1, + /* Extra condensed font width */ + FONT_WIDTH_EXTRA_CONDENSED = 2, + /* condensed font width */ + FONT_WIDTH_CONDENSED = 3, + /* Semi condensed font width */ + FONT_WIDTH_SEMI_CONDENSED = 4, + /* Normal font width */ + FONT_WIDTH_NORMAL = 5, + /* Semi expanded font width */ + FONT_WIDTH_SEMI_EXPANDED = 6, + /* Expanded font width */ + FONT_WIDTH_EXPANDED = 7, + /* Extra expanded font width */ + FONT_WIDTH_EXTRA_EXPANDED = 8, + /* Ultra expanded font width */ + FONT_WIDTH_ULTRA_EXPANDED = 9, +}; + +/** + * @brief Defines the font style struct. + * + * @since 12 + * @version 1.0 + */ +typedef struct OH_Drawing_FontStyleStruct { + /** Font weight */ + OH_Drawing_FontWeight weight; + /** Font width */ + OH_Drawing_FontWidth width; + /** Font slant */ + OH_Drawing_FontStyle slant; +} OH_Drawing_FontStyleStruct; + /** * @brief Defines the fontfeature. * @@ -366,6 +574,35 @@ typedef struct { int value; } OH_Drawing_FontFeature; +/** + * @brief Defines StrutStyle info struct. + * + * @since 12 + * @version 1.0 + */ +typedef struct { + /** The font weight to use when calculating the strut */ + OH_Drawing_FontWeight weight; + /** The font style to use when calculating the strut */ + OH_Drawing_FontStyle style; + /** The size of the ascent plus descent in logical pixels */ + double size; + /** The minimum height of the strut, as a multiple of fontSize */ + double heightScale; + /** Whether the height is override */ + bool heightOverride; + /** Whether the halfleading is enable */ + bool halfLeading; + /** The additional leading to apply to the strut as a multiple of Size */ + double leading; + /** Whether the strut height should be forced */ + bool forceStrutHeight; + /** The size of font families */ + size_t familiesSize; + /** The families of the font to use when calculating the strut */ + char** families; +} OH_Drawing_StrutStyle; + /** * @brief Creates an OH_Drawing_TypographyStyle object. * @@ -1697,6 +1934,28 @@ float OH_Drawing_TypographyGetIndentsWithIndex(OH_Drawing_Typography*, int); */ void OH_Drawing_DestroyTextShadows(OH_Drawing_TextShadow*); +/** + * @brief Set mode of applying the leading over and under text. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param heightMode Indicates the mode to set. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_TypographyTextSetHeightBehavior(OH_Drawing_TypographyStyle*, OH_Drawing_TextHeightBehavior heightMode); + +/** + * @brief Get mode of applying the leading over and under text. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @return Returns the mode. + * @since 12 + * @version 1.0 + */ +OH_Drawing_TextHeightBehavior OH_Drawing_TypographyTextGetHeightBehavior(OH_Drawing_TypographyStyle*); + /** * @brief Set struct of background rect and styleId of text. * @@ -1943,6 +2202,459 @@ bool OH_Drawing_TextStyleGetHalfLeading(OH_Drawing_TextStyle*); */ const char* OH_Drawing_TextStyleGetLocale(OH_Drawing_TextStyle*); +/** + * @brief Sets the text style, including font weight, font width and font slant. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param OH_Drawing_FontStyleStruct Indicates an OH_Drawing_FontStyleStruct object. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_SetTextStyleFontStyleStruct(OH_Drawing_TextStyle* drawingTextStyle, + OH_Drawing_FontStyleStruct fontStyle); + +/** + * @brief Gets the text style, including font weight, font width and font slant. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @return Returns the OH_Drawing_FontStyleStruct object getted. + * @since 12 + * @version 1.0 + */ +OH_Drawing_FontStyleStruct OH_Drawing_TextStyleGetFontStyleStruct(OH_Drawing_TextStyle* drawingTextStyle); + +/** + * @brief Sets the typography style, including font weight, font width and font slant. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param OH_Drawing_FontStyleStruct Indicates an OH_Drawing_FontStyleStruct object. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_SetTypographyStyleFontStyleStruct(OH_Drawing_TypographyStyle* drawingStyle, + OH_Drawing_FontStyleStruct fontStyle); + +/** + * @brief Gets the typography style, including font weight, font width and font slant. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @return Returns the OH_Drawing_FontStyleStruct object getted. + * @since 12 + * @version 1.0 + */ +OH_Drawing_FontStyleStruct OH_Drawing_TypographyStyleGetFontStyleStruct(OH_Drawing_TypographyStyle* drawingStyle); + +/** + * @brief Gets whether the two TextStyle objects are equal. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates source of comparison OH_Drawing_TextStyle object. + * @param comparedStyle Indicates comparison OH_Drawing_TextStyle object. + * @return Compare result. + * @since 12 + * @version 1.0 + */ +bool OH_Drawing_TextStyleIsEqual(const OH_Drawing_TextStyle* style, const OH_Drawing_TextStyle* comparedStyle); + +/** + * @brief Gets whether the font properties of two TextStyle objects are equal. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates source of comparison OH_Drawing_TextStyle object. + * @param comparedStyle Indicates comparison OH_Drawing_TextStyle object. + * @return Compare result. + * @since 12 + * @version 1.0 + */ +bool OH_Drawing_TextStyleIsEqualByFont(const OH_Drawing_TextStyle* style, const OH_Drawing_TextStyle* comparedStyle); + +/** + * @brief Gets whether two TextStyle objects match attributes + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param textStyleType Indicates enumerates of text style type. + * @param style Indicates source of comparison OH_Drawing_TextStyle object. + * @param comparedStyle Indicates comparison OH_Drawing_TextStyle object. + * @return Match attributes result. + * @since 12 + * @version 1.0 + */ +bool OH_Drawing_TextStyleIsAttributeMatched(const OH_Drawing_TextStyle* style, + const OH_Drawing_TextStyle* comparedStyle, OH_Drawing_TextStyleType textStyleType); + +/** + * @brief Set placeholder of TextStyle. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_TextStyleSetPlaceholder(OH_Drawing_TextStyle* style); + +/** + * @brief Gets whether placeholder is enable. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @return Whether placeholder is enable. + * @since 12 + * @version 1.0 + */ +bool OH_Drawing_TextStyleIsPlaceholder(OH_Drawing_TextStyle* style); + +/** + * @brief Gets text alignment mode. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @return Returns text alignment mode. + * @since 12 + * @version 1.0 + */ +OH_Drawing_TextAlign OH_Drawing_TypographyStyleGetEffectiveAlignment(OH_Drawing_TypographyStyle* style); + +/** + * @brief Gets whether the hinting is enabled. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @return True, if the hinting takes effect; False, if the hinting does not take effect. + * @since 12 + * @version 1.0 + */ +bool OH_Drawing_TypographyStyleIsHintEnabled(OH_Drawing_TypographyStyle* style); + +/** + * @brief Gets system font configuration information. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontConfigInfoErrorCode Indicates error code returned, based on the error code to + * release the memory of system font configuration information. + * For details, see the enum OH_Drawing_FontConfigInfoErrorCode. + * @return Returns a pointer to system font configuration information. + * Indicates the pointer to an OH_Drawing_FontConfigInfo object. + * @since 12 + * @version 1.0 + */ +OH_Drawing_FontConfigInfo* OH_Drawing_GetSystemFontConfigInfo(OH_Drawing_FontConfigInfoErrorCode*); + +/** + * @brief Releases the memory occupied by system font configuration information. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_FontConfigInfo Indicates the pointer to an OH_Drawing_FontConfigInfo object. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_DestroySystemFontConfigInfo(OH_Drawing_FontConfigInfo*); + +/** + * @brief Sets the strut style for text typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param OH_Drawing_StrutStyle Indicates the pointer of OH_Drawing_StrutStyle object. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_SetTypographyStyleTextStrutStyle(OH_Drawing_TypographyStyle*, OH_Drawing_StrutStyle*); + +/** + * @brief Releases the memory occupied by an OH_Drawing_StrutStyle object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_StrutStyle Indicates the pointer of OH_Drawing_StrutStyle object. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_TypographyStyleDestroyStrutStyle(OH_Drawing_StrutStyle*); + +/** + * @brief Gets the strut style for text typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @return Returns the pointer of OH_Drawing_StrutStyle object. + * @since 12 + * @version 1.0 + */ +OH_Drawing_StrutStyle* OH_Drawing_TypographyStyleGetStrutStyle(OH_Drawing_TypographyStyle*); + +/** + * @brief Overriding the struct StrutStyle equals operator. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param from Indicates source of comparison object. + * @param to Indicates comparison object. + * @since 12 + * @version 1.0 + */ +bool OH_Drawing_TypographyStyleStrutStyleEquals(OH_Drawing_StrutStyle* from, OH_Drawing_StrutStyle* to); + +/** + * @brief Sets the hinting of text typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param hintsEnabled Indicates the hinting of text typography.. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_TypographyStyleSetHintsEnabled(OH_Drawing_TypographyStyle* style, bool hintsEnabled); + +/* @brief Getting all font metrics from target row. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Typography Indicates a pointer to a typesetting object. + * @param lineNumber Indicates specifies the number of rows. + * @param fontMetricsSize Indicates the return size of font metrics struct from current line. + * @return Returns all character measures for the current row. + * @since 12 + * @version 1.0 + */ +OH_Drawing_Font_Metrics* OH_Drawing_TypographyGetLineFontMetrics(OH_Drawing_Typography*, + size_t lineNumber, size_t* fontMetricsSize); + +/** + * @brief Free up all the space taken up by the lineFontMetric. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Font_Metrics Indicates the first address of the lineFontMetric gather to be destroyed. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_TypographyDestroyLineFontMetrics(OH_Drawing_Font_Metrics*); + +/** + * @brief Mark the Typography as dirty, and initially state the Typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Typography Indicates the pointer to the text OH_Drawing_Typography object. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_TypographyMarkDirty(OH_Drawing_Typography*); + +/** + * @brief Get the unresolved Glyphs count of lines in a text. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Typography Indicates the pointer to the text OH_Drawing_Typography object. + * @return Returns unresolved Glyphs count. + * @since 12 + * @version 1.0 + */ +int32_t OH_Drawing_TypographyGetUnresolvedGlyphsCount(OH_Drawing_Typography*); + +/** + * @brief Update the font size of lines in a text. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Typography Indicates the pointer to the text OH_Drawing_Typography object. + * @param from Indicates the source of the original font size. + * @param to Indicates the destination of the updated font size. + * @param fontSize Indicates the size of the font. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_TypographyUpdateFontSize(OH_Drawing_Typography*, size_t from, size_t to, float fontSize); + +/** + * @brief Get whether the text layout enables line styles. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to the text OH_Drawing_TypographyStyle object. + * @return Whether or not to enable line styles in text layout only, true means enable, false means disable. + * @since 12 + * @version 1.0 + */ +bool OH_Drawing_TypographyTextGetLineStyle(OH_Drawing_TypographyStyle*); + +/** + * @brief Get the font weight of line style for text typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object OH_Drawing_TypographyStyle. + * @return Return the font weight of line style for text typography. + * For details, see the enum OH_Drawing_FontWeight. + * @since 12 + * @version 1.0 + */ +OH_Drawing_FontWeight OH_Drawing_TypographyTextlineStyleGetFontWeight(OH_Drawing_TypographyStyle*); + +/** + * @brief Get the font style of line style for text typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object OH_Drawing_TypographyStyle. + * @return Return the font style of line style for text typography. + * For details, see the enum OH_Drawing_FontStyle. + * @since 12 + * @version 1.0 + */ +OH_Drawing_FontStyle OH_Drawing_TypographyTextlineStyleGetFontStyle(OH_Drawing_TypographyStyle*); + +/** + * @brief Get the font families of line style for text typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object OH_Drawing_TypographyStyle. + * @param num The number of obtained font names. + * @return Return the font families of line style for text typography. + * @since 12 + * @version 1.0 + */ +char** OH_Drawing_TypographyTextlineStyleGetFontFamilies(OH_Drawing_TypographyStyle*, size_t* num); + +/** + * @brief Releases the memory occupied by a list of font families names. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param fontFamilies Indicates the pointer to a list of font families names. + * @param fontFamiliesNum Indicates the number of obtained font names. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_TypographyTextlineStyleDestroyFontFamilies(char** fontFamilies, size_t fontFamiliesNum); + +/** + * @brief Get the font size of font size for text typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object OH_Drawing_TypographyStyle. + * @return Return the font size of font size for text typography. + * @since 12 + * @version 1.0 + */ +double OH_Drawing_TypographyTextlineStyleGetFontSize(OH_Drawing_TypographyStyle*); + +/** + * @brief Get the font height scale in text layout. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object OH_Drawing_TypographyStyle. + * @return Retrun the font height scale in text layout. + * @since 12 + * @version 1.0 + */ +double OH_Drawing_TypographyTextlineStyleGetHeightScale(OH_Drawing_TypographyStyle*); + +/** + * @brief Get whether to enable font height for line styles in text layout only. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object OH_Drawing_TypographyStyle. + * @return Whether or not to enable the font height for line styles in text layout only, + * true means enable, false means disable. + * @since 12 + * @version 1.0 + */ +bool OH_Drawing_TypographyTextlineStyleGetHeightOnly(OH_Drawing_TypographyStyle*); + +/** + * @brief Get the half leading of line style for text typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object OH_Drawing_TypographyStyle. + * @return Whether to enable the text line half leading style, true means enable, false means disable. + * @since 12 + * @version 1.0 + */ +bool OH_Drawing_TypographyTextlineStyleGetHalfLeading(OH_Drawing_TypographyStyle*); + +/** + * @brief Get the spacing scale of line style for text typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object OH_Drawing_TypographyStyle. + * @return Return the spacing scale of line style for text typography. + * @since 12 + * @version 1.0 + */ +double OH_Drawing_TypographyTextlineStyleGetSpacingScale(OH_Drawing_TypographyStyle*); + +/** + * @brief Get whether only line style is enabled for text typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object OH_Drawing_TypographyStyle. + * @return Returns whether only line style is enabled for text layout, true means it is enabled, false means it is not. + * @since 12 + * @version 1.0 + */ +bool OH_Drawing_TypographyTextlineGetStyleOnly(OH_Drawing_TypographyStyle*); + +/** + * @brief Get the text alignment mode. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object OH_Drawing_TypographyStyle. + * @return Return the text alignment mode. For details, see the enum OH_Drawing_TextAlign. + * @since 12 + * @version 1.0 + */ +OH_Drawing_TextAlign OH_Drawing_TypographyGetTextAlign(OH_Drawing_TypographyStyle*); + +/** + * @brief Get the text direction. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object OH_Drawing_TypographyStyle. + * @return Return the text direction. For details, see the enum OH_Drawing_TextDirection. + * @since 12 + * @version 1.0 + */ +OH_Drawing_TextDirection OH_Drawing_TypographyGetTextDirection(OH_Drawing_TypographyStyle*); + +/** + * @brief Sets the maximum number of lines in a text. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object OH_Drawing_TypographyStyle. + * @return Return the maximum number of lines in a text. + * @since 12 + * @version 1.0 + */ +size_t OH_Drawing_TypographyGetTextMaxLines(OH_Drawing_TypographyStyle*); + +/** + * @brief Get the ellipsis of lines in a text. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object OH_Drawing_TypographyStyle. + * @return Return the ellipsis of lines in a text. + * @since 12 + * @version 1.0 + */ +char* OH_Drawing_TypographyGetTextEllipsis(OH_Drawing_TypographyStyle*); + +/** + * @brief Releases the memory occupied by a list of Ellipsis names. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param ellipsis Indicates the pointer to a list of Ellipsis names. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_TypographyDestroyEllipsis(char* ellipsis); + +/** + * @brief Overriding the class ParagraphStyle equals operator. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param from Indicates source of comparison object. + * @param to Indicates comparison object. + * @return Compare result. + * @since 12 + * @version 1.0 + */ +bool OH_Drawing_TypographyStyleEquals(OH_Drawing_TypographyStyle* from, OH_Drawing_TypographyStyle* to); + #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_types.h b/graphic/graphic_2d/native_drawing/drawing_types.h index a07fa55fc98..7cbb5fb9f55 100644 --- a/graphic/graphic_2d/native_drawing/drawing_types.h +++ b/graphic/graphic_2d/native_drawing/drawing_types.h @@ -443,6 +443,22 @@ typedef enum { TEXT_ENCODING_GLYPH_ID, } OH_Drawing_TextEncoding; +/** + * @brief Defines a OH_Drawing_FontMgr, which is used to manage font family. + * + * @since 12 + * @version 1.0 + */ +typedef struct OH_Drawing_FontMgr OH_Drawing_FontMgr; + +/** + * @brief Defines a OH_Drawing_FontStyleSet, which is used to manage font style. + * + * @since 12 + * @version 1.0 + */ +typedef struct OH_Drawing_FontStyleSet OH_Drawing_FontStyleSet; + #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 b0ed71fce71..6b4b29cfdc4 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -18,7 +18,7 @@ "name": "OH_Drawing_BitmapGetImageInfo" }, { "name": "OH_Drawing_BitmapGetPixels" }, - { + { "first_introduced": "12", "name": "OH_Drawing_BitmapReadPixels" }, @@ -64,24 +64,24 @@ "first_introduced": "12", "name": "OH_Drawing_CanvasDrawPixelMapRect" }, - { + { "first_introduced": "12", - "name": "OH_Drawing_CanvasDrawPoints" + "name": "OH_Drawing_CanvasDrawPoints" }, { "name": "OH_Drawing_CanvasDrawRect" }, { "name": "OH_Drawing_CanvasDrawRoundRect" }, { "name": "OH_Drawing_CanvasDrawTextBlob" }, - { + { "first_introduced": "12", "name": "OH_Drawing_CanvasDrawRegion" }, - { + { "first_introduced": "12", "name": "OH_Drawing_CanvasDrawBackground" }, - { + { "first_introduced": "12", - "name": "OH_Drawing_CanvasDrawVertices" + "name": "OH_Drawing_CanvasDrawVertices" }, { "name": "OH_Drawing_CanvasDrawImageRect" }, { @@ -786,15 +786,15 @@ "first_introduced": "12", "name": "OH_Drawing_DestroyTextShadows" }, - { + { "first_introduced": "12", "name": "OH_Drawing_RegionCreate" }, - { + { "first_introduced": "12", "name": "OH_Drawing_RegionDestroy" }, - { + { "first_introduced": "12", "name": "OH_Drawing_RegionSetRect" }, @@ -897,5 +897,241 @@ { "first_introduced": "12", "name": "OH_Drawing_TextStyleGetLocale" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontMgrCreate" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontMgrDestroy" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontMgrGetFamilyCount" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontMgrGetFamilyName" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontMgrDestroyFamilyName" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontMgrCreateFontStyleSet" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontMgrDestroyFontStyleSet" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontMgrMatchFamily" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontMgrMatchFamilyStyle" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontMgrMatchFamilyStyleCharacter" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_SetTextStyleFontStyleStruct" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TextStyleGetFontStyleStruct" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_SetTypographyStyleFontStyleStruct" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyStyleGetFontStyleStruct" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TextStyleIsEqual" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TextStyleIsEqualByFont" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TextStyleIsAttributeMatched" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TextStyleSetPlaceholder" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TextStyleIsPlaceholder" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyStyleGetEffectiveAlignment" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyStyleIsHintEnabled" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontStyleSetCreateTypeface" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontStyleSetGetStyle" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontStyleSetFreeStyleName" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontStyleSetMatchStyle" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_FontStyleSetCount" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyTextSetHeightBehavior" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyTextGetHeightBehavior" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_GetSystemFontConfigInfo" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_DestroySystemFontConfigInfo" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_SetTypographyStyleTextStrutStyle" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyStyleDestroyStrutStyle" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyStyleGetStrutStyle" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyStyleStrutStyleEquals" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyStyleSetHintsEnabled" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyGetLineFontMetrics" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyDestroyLineFontMetrics" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyMarkDirty" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyGetUnresolvedGlyphsCount" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyUpdateFontSize" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_RegisterThemeFontBuffer" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_RegisterThemeFont" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyTextGetLineStyle" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyTextlineStyleGetFontStyle" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyTextlineStyleGetFontWeight" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyTextlineStyleGetFontFamilies" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyTextlineStyleDestroyFontFamilies" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyTextlineStyleGetFontSize" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyTextlineStyleGetHeightOnly" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyTextlineStyleGetHeightScale" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyTextlineStyleGetHalfLeading" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyTextlineStyleGetSpacingScale" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyTextlineGetStyleOnly" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyGetTextAlign" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyGetTextDirection" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyGetTextMaxLines" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyGetTextEllipsis" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyDestroyEllipsis" + }, + { + "first_introduced": "12", + "name":"OH_Drawing_TypographyStyleEquals" } ] \ No newline at end of file -- Gitee From 60656198bc8cc06f2da5ff0a59a52f659071cc7b Mon Sep 17 00:00:00 2001 From: changleipeng Date: Fri, 29 Mar 2024 12:48:42 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0library?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: changleipeng --- graphic/graphic_2d/native_drawing/drawing_font_mgr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_font_mgr.h b/graphic/graphic_2d/native_drawing/drawing_font_mgr.h index d74fbbf3140..b1621c44c93 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font_mgr.h +++ b/graphic/graphic_2d/native_drawing/drawing_font_mgr.h @@ -33,6 +33,7 @@ * * @brief Declares functions related to the fontmgr object in the drawing module. * + * @library libnative_drawing_ndk.z.so * @since 12 * @version 1.0 */ -- Gitee