-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.d.ts
103 lines (99 loc) · 2.02 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/**
* @author Wayne
* @Date 2022-03-22 14:55:08
* @LastEditTime 2023-12-16 09:50:31
*/
interface SvgIcons2FontOptions {
/**
* The font family name you want
*
* @default 'iconfont'
*/
fontName?: string;
/**
* The font id you want (Default value: the options.fontName)
*
* @default the options.fontName value
*/
fontId?: string;
/**
* The font style you want.
*/
fontStyle?: string;
/**
* The font weight
*/
fontWeight?: string;
/**
* Creates a monospace font of the width of the largest input icon.
*/
fixedWidth?: boolean;
/**
* Calculate the bounds of a glyph and center it horizontally.
*/
centerHorizontally?: boolean;
/**
* Centers the glyphs vertically in the generated font.
* @default false
*/
centerVertically?: boolean;
/**
* Normalize icons by scaling them to the height of the highest icon.
*/
normalize?: boolean;
/**
* The outputted font height (defaults to the height of the highest input icon).
*/
fontHeight?: number;
/**
* Setup SVG path rounding.
*
* @default 10e12
*/
round?: number;
}
export interface InitOptionsParams extends SvgIcons2FontOptions {
/**
* 字体名称
* @default iconfont
*/
fontName: string;
/**
* 起始编码
* @default 10000
*/
unicodeStart: number;
/**
* debug开关
* @default false
*/
debug: boolean;
/**
* 是否输出示例
* @default true
*/
noDemo: boolean;
/**
* svg文件来源目录
*/
src: string;
/**
* 字体输出目录
* @default ./dist
*/
dist: string;
/**
* unicode类型的示例html名称
* @default demo_unicode.html
*/
demoUnicodeHTML: string;
/**
* class类型的示例html名称
* @default demo_fontclass.html
*/
demoFontClassHTML: string;
}
declare const Svgs2fonts: {
init(options: Partial<InitOptionsParams>): Promise<true | Error>;
};
export default Svgs2fonts;