Home > SYS_FontManager > deleteFont
SYS_FontManager.deleteFont() method
Delete the specified font from the font list
Signature
typescript
function deleteFont(fontName: string): Promise<boolean>;1
Parameters
Parameter | Type | Description |
|---|---|---|
fontName | string | Font name |
Returns
Promise<boolean>
Delete Whether the operation is successful
Example
javascript
// 1. 准备一个待删除的测试字体
await eda.sys_FontManager.addFont('嘉立创示例_测试字体');
// 2. 从字体列表删除该字体
const deleted = await eda.sys_FontManager.deleteFont('嘉立创示例_测试字体');
// 3. 确认字体已不在列表中
const fonts = await eda.sys_FontManager.getFontsList();
console.log('删除结果:', deleted);
console.log('已不在字体列表:', !fonts.includes('嘉立创示例_测试字体'));1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11