11# COMPLETE
22
3- from typing import BinaryIO , List , Literal , NamedTuple , Optional , Tuple , Union , overload
3+ from typing import BinaryIO , Literal , NamedTuple , overload
44
55class CharMetrics (NamedTuple ):
66 width : float
77 name : str
8- bbox : List [int ]
8+ bbox : list [int ]
99
1010class CompositePart (NamedTuple ):
1111 name : str
@@ -20,11 +20,11 @@ class AFM:
2020 def family_name (self ) -> str : ...
2121 def get_angle (self ) -> float : ...
2222 @overload
23- def get_bbox_char (self , c : str , isord : Literal [False ] = ...) -> List [int ]: ...
23+ def get_bbox_char (self , c : str , isord : Literal [False ] = ...) -> list [int ]: ...
2424 @overload
25- def get_bbox_char (self , c : int , isord : Literal [True ] = ...) -> List [int ]: ...
25+ def get_bbox_char (self , c : int , isord : Literal [True ] = ...) -> list [int ]: ...
2626 @overload
27- def get_bbox_char (self , c : Union [ str , int ] , isord : bool = ...) -> List [int ]: ...
27+ def get_bbox_char (self , c : str | int , isord : bool = ...) -> list [int ]: ...
2828 def get_capheight (self ) -> float : ...
2929 def get_familyname (self ) -> str : ...
3030 def get_fontname (self ) -> str : ...
@@ -34,27 +34,27 @@ class AFM:
3434 @overload
3535 def get_height_char (self , c : int , isord : Literal [True ] = ...) -> int : ...
3636 @overload
37- def get_height_char (self , c : Union [ str , int ] , isord : bool = ...) -> int : ...
37+ def get_height_char (self , c : str | int , isord : bool = ...) -> int : ...
3838 def get_horizontal_stem_width (self ) -> float : ...
39- def get_kern_dist (self , c1 : Union [ str , int ] , c2 : Union [ str , int ] ) -> float : ...
39+ def get_kern_dist (self , c1 : str | int , c2 : str | int ) -> float : ...
4040 def get_kern_dist_from_name (self , name1 : str , name2 : str ) -> float : ...
4141 @overload
4242 def get_name_char (self , c : str , isord : Literal [False ] = ...) -> str : ...
4343 @overload
4444 def get_name_char (self , c : int , isord : Literal [True ] = ...) -> str : ...
4545 @overload
46- def get_name_char (self , c : Union [ str , int ] , isord : bool = ...) -> str : ...
47- def get_str_bbox (self , s : Union [ str , bytes ] ) -> Tuple [float , float , float , float , float ]: ...
48- def get_str_bbox_and_descent (self , s : Union [ str , bytes ] ) -> Tuple [float , float , float , float , float ]: ...
46+ def get_name_char (self , c : str | int , isord : bool = ...) -> str : ...
47+ def get_str_bbox (self , s : str | bytes ) -> tuple [float , float , float , float , float ]: ...
48+ def get_str_bbox_and_descent (self , s : str | bytes ) -> tuple [float , float , float , float , float ]: ...
4949 def get_underline_thickness (self ) -> float : ...
50- def get_vertical_stem_width (self ) -> Optional [ float ] : ...
50+ def get_vertical_stem_width (self ) -> float | None : ...
5151 def get_weight (self ) -> str : ...
5252 @overload
5353 def get_width_char (self , c : str , isord : Literal [False ] = ...) -> float : ...
5454 @overload
5555 def get_width_char (self , c : int , isord : Literal [True ] = ...) -> float : ...
5656 @overload
57- def get_width_char (self , c : Union [ str , int ] , isord : bool = ...) -> float : ...
57+ def get_width_char (self , c : str | int , isord : bool = ...) -> float : ...
5858 def get_width_from_char_name (self , name : str ) -> float : ...
5959 def get_xheight (self ) -> float : ...
60- def string_width_height (self , s : str ) -> Tuple [float , float ]: ...
60+ def string_width_height (self , s : str ) -> tuple [float , float ]: ...
0 commit comments