@@ -160,27 +160,6 @@ class _SfntPcltDict(TypedDict):
160
160
161
161
@final
162
162
class FT2Font :
163
- ascender : int
164
- bbox : tuple [int , int , int , int ]
165
- descender : int
166
- face_flags : int
167
- family_name : str
168
- fname : str
169
- height : int
170
- max_advance_height : int
171
- max_advance_width : int
172
- num_charmaps : int
173
- num_faces : int
174
- num_fixed_sizes : int
175
- num_glyphs : int
176
- postscript_name : str
177
- scalable : bool
178
- style_flags : int
179
- style_name : str
180
- underline_position : int
181
- underline_thickness : int
182
- units_per_EM : int
183
-
184
163
def __init__ (
185
164
self ,
186
165
filename : str | BinaryIO ,
@@ -232,6 +211,46 @@ class FT2Font:
232
211
def set_text (
233
212
self , string : str , angle : float = ..., flags : int = ...
234
213
) -> NDArray [np .float64 ]: ...
214
+ @property
215
+ def ascender (self ) -> int : ...
216
+ @property
217
+ def bbox (self ) -> tuple [int , int , int , int ]: ...
218
+ @property
219
+ def descender (self ) -> int : ...
220
+ @property
221
+ def face_flags (self ) -> int : ...
222
+ @property
223
+ def family_name (self ) -> str : ...
224
+ @property
225
+ def fname (self ) -> str : ...
226
+ @property
227
+ def height (self ) -> int : ...
228
+ @property
229
+ def max_advance_height (self ) -> int : ...
230
+ @property
231
+ def max_advance_width (self ) -> int : ...
232
+ @property
233
+ def num_charmaps (self ) -> int : ...
234
+ @property
235
+ def num_faces (self ) -> int : ...
236
+ @property
237
+ def num_fixed_sizes (self ) -> int : ...
238
+ @property
239
+ def num_glyphs (self ) -> int : ...
240
+ @property
241
+ def postscript_name (self ) -> str : ...
242
+ @property
243
+ def scalable (self ) -> bool : ...
244
+ @property
245
+ def style_flags (self ) -> int : ...
246
+ @property
247
+ def style_name (self ) -> str : ...
248
+ @property
249
+ def underline_position (self ) -> int : ...
250
+ @property
251
+ def underline_thickness (self ) -> int : ...
252
+ @property
253
+ def units_per_EM (self ) -> int : ...
235
254
236
255
@final
237
256
class FT2Image : # TODO: When updating mypy>=1.4, subclass from Buffer.
@@ -240,15 +259,23 @@ class FT2Image: # TODO: When updating mypy>=1.4, subclass from Buffer.
240
259
241
260
@final
242
261
class Glyph :
243
- width : int
244
- height : int
245
- horiBearingX : int
246
- horiBearingY : int
247
- horiAdvance : int
248
- linearHoriAdvance : int
249
- vertBearingX : int
250
- vertBearingY : int
251
- vertAdvance : int
252
-
262
+ @property
263
+ def width (self ) -> int : ...
264
+ @property
265
+ def height (self ) -> int : ...
266
+ @property
267
+ def horiBearingX (self ) -> int : ...
268
+ @property
269
+ def horiBearingY (self ) -> int : ...
270
+ @property
271
+ def horiAdvance (self ) -> int : ...
272
+ @property
273
+ def linearHoriAdvance (self ) -> int : ...
274
+ @property
275
+ def vertBearingX (self ) -> int : ...
276
+ @property
277
+ def vertBearingY (self ) -> int : ...
278
+ @property
279
+ def vertAdvance (self ) -> int : ...
253
280
@property
254
281
def bbox (self ) -> tuple [int , int , int , int ]: ...
0 commit comments