Skip to content

Commit e3bf17e

Browse files
authored
Cleanup dviread docs. (#15792)
Cleanup dviread docs.
2 parents d7c40ae + 7a0f18a commit e3bf17e

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

lib/matplotlib/dviread.py

+21-20
Original file line numberDiff line numberDiff line change
@@ -573,12 +573,6 @@ class Vf(Dvi):
573573
r"""
574574
A virtual font (\*.vf file) containing subroutines for dvi files.
575575
576-
Usage::
577-
578-
vf = Vf(filename)
579-
glyph = vf[code]
580-
glyph.text, glyph.boxes, glyph.width
581-
582576
Parameters
583577
----------
584578
filename : str or path-like
@@ -589,6 +583,13 @@ class Vf(Dvi):
589583
http://mirrors.ctan.org/info/knuth/virtual-fonts
590584
This class reuses some of the machinery of `Dvi`
591585
but replaces the `_read` loop and dispatch mechanism.
586+
587+
Examples
588+
--------
589+
::
590+
vf = Vf(filename)
591+
glyph = vf[code]
592+
glyph.text, glyph.boxes, glyph.width
592593
"""
593594

594595
def __init__(self, filename):
@@ -753,20 +754,6 @@ class PsfontsMap:
753754
"""
754755
A psfonts.map formatted file, mapping TeX fonts to PS fonts.
755756
756-
Usage::
757-
758-
>>> map = PsfontsMap(find_tex_file('pdftex.map'))
759-
>>> entry = map[b'ptmbo8r']
760-
>>> entry.texname
761-
b'ptmbo8r'
762-
>>> entry.psname
763-
b'Times-Bold'
764-
>>> entry.encoding
765-
'/usr/local/texlive/2008/texmf-dist/fonts/enc/dvips/base/8r.enc'
766-
>>> entry.effects
767-
{'slant': 0.16700000000000001}
768-
>>> entry.filename
769-
770757
Parameters
771758
----------
772759
filename : str or path-like
@@ -792,6 +779,20 @@ class PsfontsMap:
792779
the Times-Bold example above), while the pdf-related files perhaps
793780
only avoid the "Base 14" pdf fonts. But the user may have
794781
configured these files differently.
782+
783+
Examples
784+
--------
785+
>>> map = PsfontsMap(find_tex_file('pdftex.map'))
786+
>>> entry = map[b'ptmbo8r']
787+
>>> entry.texname
788+
b'ptmbo8r'
789+
>>> entry.psname
790+
b'Times-Bold'
791+
>>> entry.encoding
792+
'/usr/local/texlive/2008/texmf-dist/fonts/enc/dvips/base/8r.enc'
793+
>>> entry.effects
794+
{'slant': 0.16700000000000001}
795+
>>> entry.filename
795796
"""
796797
__slots__ = ('_font', '_filename')
797798

0 commit comments

Comments
 (0)