Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4512594

Browse files
committed
Do not distill and embed fonts if no text
1 parentefaedd8 commit4512594

File tree

1 file changed

+29
-28
lines changed

1 file changed

+29
-28
lines changed

‎lib/matplotlib/backends/backend_ps.py

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,34 +1063,35 @@ def _print_figure_tex(
10631063
""",
10641064
encoding="latin-1")
10651065

1066-
iforientationis_Orientation.landscape:# now, ready to rotate
1067-
width,height=height,width
1068-
bbox= (lly,llx,ury,urx)
1069-
1070-
# set the paper size to the figure size if is_eps. The
1071-
# resulting ps file has the given size with correct bounding
1072-
# box so that there is no need to call 'pstoeps'
1073-
ifis_eps:
1074-
paper_width,paper_height=orientation.swap_if_landscape(
1075-
self.figure.get_size_inches())
1076-
else:
1077-
ifpapertype=='auto':
1078-
papertype=_get_papertype(width,height)
1079-
paper_width,paper_height=papersize[papertype]
1080-
1081-
psfrag_rotated=_convert_psfrags(
1082-
tmppath,ps_renderer.psfrag,paper_width,paper_height,
1083-
orientation.name)
1084-
1085-
if (mpl.rcParams['ps.usedistiller']=='ghostscript'
1086-
ormpl.rcParams['text.usetex']):
1087-
_try_distill(gs_distill,
1088-
tmppath,is_eps,ptype=papertype,bbox=bbox,
1089-
rotated=psfrag_rotated)
1090-
elifmpl.rcParams['ps.usedistiller']=='xpdf':
1091-
_try_distill(xpdf_distill,
1092-
tmppath,is_eps,ptype=papertype,bbox=bbox,
1093-
rotated=psfrag_rotated)
1066+
ifps_renderer.psfrag:
1067+
iforientationis_Orientation.landscape:# now, ready to rotate
1068+
width,height=height,width
1069+
bbox= (lly,llx,ury,urx)
1070+
1071+
# set the paper size to the figure size if is_eps. The
1072+
# resulting ps file has the given size with correct bounding
1073+
# box so that there is no need to call 'pstoeps'
1074+
ifis_eps:
1075+
paper_width,paper_height=orientation.swap_if_landscape(
1076+
self.figure.get_size_inches())
1077+
else:
1078+
ifpapertype=='auto':
1079+
papertype=_get_papertype(width,height)
1080+
paper_width,paper_height=papersize[papertype]
1081+
1082+
psfrag_rotated=_convert_psfrags(
1083+
tmppath,ps_renderer.psfrag,paper_width,paper_height,
1084+
orientation.name)
1085+
1086+
if (mpl.rcParams['ps.usedistiller']=='ghostscript'
1087+
ormpl.rcParams['text.usetex']):
1088+
_try_distill(gs_distill,
1089+
tmppath,is_eps,ptype=papertype,bbox=bbox,
1090+
rotated=psfrag_rotated)
1091+
elifmpl.rcParams['ps.usedistiller']=='xpdf':
1092+
_try_distill(xpdf_distill,
1093+
tmppath,is_eps,ptype=papertype,bbox=bbox,
1094+
rotated=psfrag_rotated)
10941095

10951096
_move_path_to_path_or_stream(tmppath,outfile)
10961097

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp