You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
throw`You must provide a fontFamily and fontSize to a TextStyle`;
@@ -32,56 +37,96 @@ class TextStyle {
32
37
this._fontSize=fontSize;
33
38
}
34
39
40
+
/**
41
+
* @param {number} spacing The spacing between multiple lines in pixels.
42
+
*/
35
43
lineSpacing(spacing: number): this {
36
44
this._lineSpacing=spacing;
37
45
returnthis;
38
46
}
39
47
48
+
49
+
/**
50
+
* @param spacing The spacing between the letters, in pixels.
51
+
*/
40
52
letterSpacing(spacing: number): this {
41
53
this._letterSpacing=spacing;
42
54
returnthis;
43
55
}
44
56
57
+
/**
58
+
* The antialias setting to apply to the text. When this parameter is not specified, the default antialiasing for the subsystem and target device are applied.
59
+
* @param antiAlias
60
+
*/
45
61
fontAntialias(antiAlias: string): this {
46
62
this._fontAntialias=antiAlias;
47
63
returnthis;
48
64
}
49
65
66
+
/**
67
+
* The name of any universally available font or a custom font, specified as the public ID of a raw, authenticated font in your account.
68
+
* For details on custom fonts, see {@link https://cloudinary.com/documentation/image_transformations#using_custom_fonts_for_text_overlays|Using custom fonts for text overlays}.
69
+
* @param {string} fontFamilyName
70
+
*/
50
71
fontFamily(fontFamilyName: string): this {
51
72
this._fontFamily=fontFamilyName;
52
73
returnthis;
53
74
}
54
75
76
+
/**
77
+
* @param {number} fontSize The font size
78
+
*/
55
79
fontSize(fontSize: number|string): this {
56
80
this._fontSize=fontSize;
57
81
returnthis;
58
82
}
59
83
60
-
fontWeight(fontWeight: string): this {
84
+
/**
85
+
* @param {string} fontWeight The font weight
86
+
*/
87
+
fontWeight(fontWeight: 'normal'|'bold'|'thin'|'light'|string): this {
61
88
this._fontWeight=fontWeight;
62
89
returnthis;
63
90
}
64
91
65
-
fontStyle(fontStyle: string): this {
92
+
/**
93
+
*
94
+
* @param {string} fontStyle The font style.
95
+
*/
96
+
fontStyle(fontStyle: 'normal'|'italic'|string): this {
66
97
this._fontStyle=fontStyle;
67
98
returnthis;
68
99
}
69
100
101
+
/**
102
+
* @param {string} fontHinting The outline hinting style to apply to the text. When this parameter is not specified, the default hint style for the font and target device are applied.
103
+
*/
70
104
fontHinting(fontHinting: string): this {
71
105
this._fontHinting=fontHinting;
72
106
returnthis;
73
107
}
74
108
75
-
textDecoration(textDecoration: string): this {
109
+
/**
110
+
*
111
+
* @param {string} textDecoration The font decoration type.
112
+
*/
113
+
textDecoration(textDecoration: 'normal'|'underline'|'strikethrough'|string): this {
76
114
this._textDecoration=textDecoration;
77
115
returnthis;
78
116
}
79
117
80
-
textAlignment(textAlignment: string): this {
118
+
119
+
/**
120
+
* @param {string} textAlignment The text alignment
121
+
*/
122
+
textAlignment(textAlignment: 'left'|'center'|'right'|'end'|'start'|'justify'|string): this {
81
123
this._textAlignment=textAlignment;
82
124
returnthis;
83
125
}
84
126
127
+
/**
128
+
* @description Whether to include an outline stroke. Set the color and weight of the stroke
0 commit comments