@@ -133,11 +133,19 @@ class FontManager:
133133 self ,
134134 prop : str | FontProperties ,
135135 fontext : Literal ["ttf" , "afm" ] = ...,
136- directory : str | None = ...,
136+ directory : str | os . PathLike | None = ...,
137137 fallback_to_default : bool = ...,
138138 rebuild_if_missing : bool = ...,
139139 ) -> FontPath : ...
140140 def get_font_names (self ) -> list [str ]: ...
141+ def _find_fonts_by_props (
142+ self ,
143+ prop : str | FontProperties ,
144+ fontext : Literal ["ttf" , "afm" ] = ...,
145+ directory : str | os .PathLike | None = ...,
146+ fallback_to_default : bool = ...,
147+ rebuild_if_missing : bool = ...,
148+ ) -> list [FontPath ]: ...
141149
142150def is_opentype_cff_font (filename : str ) -> bool : ...
143151def get_font (
@@ -149,8 +157,8 @@ fontManager: FontManager
149157def findfont (
150158 prop : str | FontProperties ,
151159 fontext : Literal ["ttf" , "afm" ] = ...,
152- directory : str | None = ...,
160+ directory : str | os . PathLike | None = ...,
153161 fallback_to_default : bool = ...,
154162 rebuild_if_missing : bool = ...,
155- ) -> str : ...
163+ ) -> FontPath : ...
156164def get_font_names () -> list [str ]: ...
0 commit comments