1# drawing_text_font_descriptor.h 2 3 4## Overview 5 6The **drawing_text_font_descriptor.h** file declares the capabilities of font information, such as obtaining font information and searching for a font. 7 8**File to include**: <native_drawing/drawing_text_font_descriptor.h> 9 10**Library**: libnative_drawing.so 11 12**Since**: 14 13 14**Related module**: [Drawing](_drawing.md) 15 16 17## Summary 18 19 20### Types 21 22| Name| Description| 23| -------- | -------- | 24| typedef enum [OH_Drawing_SystemFontType](_drawing.md#oh_drawing_systemfonttype) [OH_Drawing_SystemFontType](_drawing.md#oh_drawing_systemfonttype) | Defines an enum for the system font types. | 25 26 27### Enums 28 29| Name| Description| 30| -------- | -------- | 31| [OH_Drawing_SystemFontType](_drawing.md#oh_drawing_systemfonttype-1) { ALL = 1 << 0, GENERIC = 1 << 1, STYLISH = 1 << 2, INSTALLED = 1 << 3, CUSTOMIZED = 1 << 4 } | Enumerates the system font types. | 32 33 34### Functions 35 36| Name| Description| 37| -------- | -------- | 38| [OH_Drawing_FontDescriptor](_o_h___drawing___font_descriptor.md) \* [OH_Drawing_MatchFontDescriptors](_drawing.md#oh_drawing_matchfontdescriptors) ([OH_Drawing_FontDescriptor](_o_h___drawing___font_descriptor.md) \*, size_t \*) | Obtains all system font descriptors that match a font descriptor. In the [OH_Drawing_FontDescriptor](_o_h___drawing___font_descriptor.md) struct, the **path** field is not used for matching, and other fields are valid only when they are not set to their default values. If all fields in [OH_Drawing_FontDescriptor](_o_h___drawing___font_descriptor.md) are set to their default values, all system font descriptors are returned. If no matching is found, NULL is returned. When [OH_Drawing_FontDescriptor](_o_h___drawing___font_descriptor.md) is no longer required, call [OH_Drawing_DestroyFontDescriptors](_drawing.md#oh_drawing_destroyfontdescriptors) to release the pointer to the object. | 39| void [OH_Drawing_DestroyFontDescriptors](_drawing.md#oh_drawing_destroyfontdescriptors) ([OH_Drawing_FontDescriptor](_o_h___drawing___font_descriptor.md) \*, size_t) | Releases an array of [OH_Drawing_FontDescriptor](_o_h___drawing___font_descriptor.md) objects. | 40| [OH_Drawing_FontDescriptor](_o_h___drawing___font_descriptor.md) \* [OH_Drawing_GetFontDescriptorByFullName](_drawing.md#oh_drawing_getfontdescriptorbyfullname) (const [OH_Drawing_String](_o_h___drawing___string.md) \*, [OH_Drawing_SystemFontType](_drawing.md#oh_drawing_systemfonttype)) | Obtains a font descriptor based on the font name and type. System fonts, style fonts, and user-installed fonts are supported. A font descriptor is a data structure that describes font features. It contains details of the font appearance and properties. | 41| [OH_Drawing_Array](_drawing.md#oh_drawing_array) \* [OH_Drawing_GetSystemFontFullNamesByType](_drawing.md#oh_drawing_getsystemfontfullnamesbytype) ([OH_Drawing_SystemFontType](_drawing.md#oh_drawing_systemfonttype)) | Obtains an array of font names by font type. | 42| const [OH_Drawing_String](_o_h___drawing___string.md) \* [OH_Drawing_GetSystemFontFullNameByIndex](_drawing.md#oh_drawing_getsystemfontfullnamebyindex) ([OH_Drawing_Array](_drawing.md#oh_drawing_array) \*, size_t) | Obtains the font name with the specified index in the font name array. | 43| void [OH_Drawing_DestroySystemFontFullNames](_drawing.md#oh_drawing_destroysystemfontfullnames) ([OH_Drawing_Array](_drawing.md#oh_drawing_array) \*) | Releases the memory occupied by the font name array obtained by font type. | 44