diff --git a/api/@ohos.graphics.text.d.ts b/api/@ohos.graphics.text.d.ts index bbe8e55b089a3bf9052052204f9f8ade3a60ed6d..b6f0b9d891c9f077cb34d232045047b16a846851 100755 --- a/api/@ohos.graphics.text.d.ts +++ b/api/@ohos.graphics.text.d.ts @@ -2849,6 +2849,17 @@ declare namespace text { * @since 20 */ function setTextUndefinedGlyphDisplay(noGlyphShow: TextUndefinedGlyphDisplay): void; + + /** + * Obtains the font descriptor array based on the provided font file path or resource. + * @param { string | Resource } path - Path or resource of the font file. + * The value must be **file://**absolute path of the font file or **rawfile/**directory or file name. + * @returns { Promise> } Promise used to return all parsed font descriptors, and an empty array will + * be returned if no fonts are found, invalid path, no permission, or non-font file. + * @syscap SystemCapability.Graphics.Drawing + * @since 22 + */ + function getFontDescriptorsFromPath(path: string | Resource): Promise>; } export default text;