From fd1c38775ed5977a34b17e7147b09ec3262781b6 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 6 Jan 2016 01:37:06 -0500 Subject: [PATCH 1/2] DOC: Add Attributes heading to type1font. --- lib/matplotlib/type1font.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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') From 83755bf97329db0474cbe2a94145018bc1e1412c Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 6 Jan 2016 20:59:20 -0500 Subject: [PATCH 2/2] DOC: Add numpydoc headings in font_manager. --- lib/matplotlib/font_manager.py | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) 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()