Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7673002

Browse files
authored
Merge pull request #10431 from QuLogic/doc-numpydoc-fonts
Some font-related numpydoc changes
2 parents 270304a + 83755bf commit 7673002

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed

lib/matplotlib/font_manager.py

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,18 @@ def __repr__(self):
395395

396396
def ttfFontProperty(font):
397397
"""
398-
A function for populating the :class:`FontKey` by extracting
399-
information from the TrueType font file.
398+
Extract information from a TrueType font file.
399+
400+
Parameters
401+
----------
402+
font : `.FT2Font`
403+
The TrueType font file from which information will be extracted.
404+
405+
Returns
406+
-------
407+
`FontEntry`
408+
The extracted font properties.
400409
401-
*font* is a :class:`FT2Font` instance.
402410
"""
403411
name = font.family_name
404412

@@ -474,10 +482,18 @@ def ttfFontProperty(font):
474482

475483
def afmFontProperty(fontpath, font):
476484
"""
477-
A function for populating a :class:`FontKey` instance by
478-
extracting information from the AFM font file.
485+
Extract information from an AFM font file.
486+
487+
Parameters
488+
----------
489+
font : `.AFM`
490+
The AFM font file from which information will be extracted.
491+
492+
Returns
493+
-------
494+
`FontEntry`
495+
The extracted font properties.
479496
480-
*font* is a class:`AFM` instance.
481497
"""
482498

483499
name = font.get_familyname()

lib/matplotlib/type1font.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,15 @@ class Type1Font(object):
4444
"""
4545
A class representing a Type-1 font, for use by backends.
4646
47-
.. attribute:: parts
47+
Attributes
48+
----------
49+
parts : tuple
50+
A 3-tuple of the cleartext part, the encrypted part, and the finale of
51+
zeros.
4852
49-
A 3-tuple of the cleartext part, the encrypted part, and the
50-
finale of zeros.
53+
prop : Dict[str, Any]
54+
A dictionary of font properties.
5155
52-
.. attribute:: prop
53-
54-
A dictionary of font properties.
5556
"""
5657
__slots__ = ('parts', 'prop')
5758

0 commit comments

Comments
 (0)