diff --git a/lib/matplotlib/font_manager.py b/lib/matplotlib/font_manager.py index 5364413bfd40..6f6268c5ad5d 100644 --- a/lib/matplotlib/font_manager.py +++ b/lib/matplotlib/font_manager.py @@ -395,10 +395,18 @@ def __repr__(self): def ttfFontProperty(font): """ - A function for populating the :class:`FontKey` by extracting - information from the TrueType font file. + Extract information from a TrueType font file. + + Parameters + ---------- + font : `.FT2Font` + The TrueType font file from which information will be extracted. + + Returns + ------- + `FontEntry` + The extracted font properties. - *font* is a :class:`FT2Font` instance. """ name = font.family_name @@ -474,10 +482,18 @@ def ttfFontProperty(font): def afmFontProperty(fontpath, font): """ - A function for populating a :class:`FontKey` instance by - extracting information from the AFM font file. + Extract information from an AFM font file. + + Parameters + ---------- + font : `.AFM` + The AFM font file from which information will be extracted. + + Returns + ------- + `FontEntry` + The extracted font properties. - *font* is a class:`AFM` instance. """ name = font.get_familyname() diff --git a/lib/matplotlib/type1font.py b/lib/matplotlib/type1font.py index de6c030299bf..0eed97ec68ea 100644 --- a/lib/matplotlib/type1font.py +++ b/lib/matplotlib/type1font.py @@ -44,14 +44,15 @@ class Type1Font(object): """ A class representing a Type-1 font, for use by backends. - .. attribute:: parts + Attributes + ---------- + parts : tuple + A 3-tuple of the cleartext part, the encrypted part, and the finale of + zeros. - A 3-tuple of the cleartext part, the encrypted part, and the - finale of zeros. + prop : Dict[str, Any] + A dictionary of font properties. - .. attribute:: prop - - A dictionary of font properties. """ __slots__ = ('parts', 'prop')