@@ -50,10 +50,10 @@ def get_fontspec():
50
50
latex_fontspec = []
51
51
texcommand = get_texcommand ()
52
52
53
- if texcommand is not "pdflatex" :
53
+ if texcommand != "pdflatex" :
54
54
latex_fontspec .append (r"\usepackage{fontspec}" )
55
55
56
- if texcommand is not "pdflatex" and rcParams .get ("pgf.rcfonts" , True ):
56
+ if texcommand != "pdflatex" and rcParams .get ("pgf.rcfonts" , True ):
57
57
# try to find fonts from rc parameters
58
58
families = ["serif" , "sans-serif" , "monospace" ]
59
59
fontspecs = [r"\setmainfont{%s}" , r"\setsansfont{%s}" ,
@@ -137,7 +137,7 @@ def _font_properties_str(prop):
137
137
family = prop .get_family ()[0 ]
138
138
if family in families :
139
139
commands .append (families [family ])
140
- elif family in system_fonts and get_texcommand () is not "pdflatex" :
140
+ elif family in system_fonts and get_texcommand () != "pdflatex" :
141
141
commands .append (r"\setmainfont{%s}\rmfamily" % family )
142
142
else :
143
143
pass # print warning?
@@ -171,7 +171,7 @@ def make_pdf_to_png_converter():
171
171
pass
172
172
# check for ghostscript
173
173
try :
174
- gs = "gs" if sys .platform is not "win32" else "gswin32c"
174
+ gs = "gs" if sys .platform != "win32" else "gswin32c"
175
175
check_output ([gs , "-v" ], stderr = subprocess .STDOUT )
176
176
tools_available .append ("gs" )
177
177
except :
@@ -215,11 +215,11 @@ def get_latex_manager():
215
215
# check if the previous instance of LatexManager can be reused
216
216
if prev and prev .latex_header == latex_header and prev .texcommand == texcommand :
217
217
if rcParams .get ("pgf.debug" , False ):
218
- print "reusing LatexManager"
218
+ print ( "reusing LatexManager" )
219
219
return prev
220
220
else :
221
221
if rcParams .get ("pgf.debug" , False ):
222
- print "creating LatexManager"
222
+ print ( "creating LatexManager" )
223
223
new_inst = LatexManager ()
224
224
LatexManagerFactory .previous_instance = new_inst
225
225
return new_inst
@@ -340,7 +340,7 @@ def _cleanup(self):
340
340
341
341
def __del__ (self ):
342
342
if rcParams .get ("pgf.debug" , False ):
343
- print "deleting LatexManager"
343
+ print ( "deleting LatexManager" )
344
344
self ._cleanup ()
345
345
346
346
def get_width_height_descent (self , text , prop ):
0 commit comments