@@ -224,12 +224,12 @@ def baseline_images(request, fontset, index, text):
224224@pytest .mark .parametrize (
225225 'fontset' , ['cm' , 'stix' , 'stixsans' , 'dejavusans' , 'dejavuserif' ])
226226@pytest .mark .parametrize ('baseline_images' , ['mathtext' ], indirect = True )
227- @image_comparison (baseline_images = None ,
227+ @image_comparison (baseline_images = None , style = 'mpl20' ,
228228 tol = 0.011 if platform .machine () in ('ppc64le' , 's390x' ) else 0 )
229229def test_mathtext_rendering (baseline_images , fontset , index , text ):
230230 mpl .rcParams ['mathtext.fontset' ] = fontset
231231 fig = plt .figure (figsize = (5.25 , 0.75 ))
232- fig .text (0.5 , 0.5 , text ,
232+ fig .text (0.5 , 0.5 , text , fontsize = 12 ,
233233 horizontalalignment = 'center' , verticalalignment = 'center' )
234234
235235
@@ -238,7 +238,7 @@ def test_mathtext_rendering(baseline_images, fontset, index, text):
238238@pytest .mark .parametrize ('fontset' , ['cm' , 'dejavusans' ])
239239@pytest .mark .parametrize ('baseline_images' , ['mathtext0' ], indirect = True )
240240@image_comparison (
241- baseline_images = None , extensions = ['svg' ],
241+ baseline_images = None , extensions = ['svg' ], style = 'mpl20' ,
242242 savefig_kwarg = {'metadata' : { # Minimize image size.
243243 'Creator' : None , 'Date' : None , 'Format' : None , 'Type' : None }})
244244def test_mathtext_rendering_svgastext (baseline_images , fontset , index , text ):
@@ -254,10 +254,10 @@ def test_mathtext_rendering_svgastext(baseline_images, fontset, index, text):
254254 ids = range (len (lightweight_math_tests )))
255255@pytest .mark .parametrize ('fontset' , ['dejavusans' ])
256256@pytest .mark .parametrize ('baseline_images' , ['mathtext1' ], indirect = True )
257- @image_comparison (baseline_images = None , extensions = ['png' ])
257+ @image_comparison (baseline_images = None , extensions = ['png' ], style = 'mpl20' )
258258def test_mathtext_rendering_lightweight (baseline_images , fontset , index , text ):
259259 fig = plt .figure (figsize = (5.25 , 0.75 ))
260- fig .text (0.5 , 0.5 , text , math_fontfamily = fontset ,
260+ fig .text (0.5 , 0.5 , text , fontsize = 12 , math_fontfamily = fontset ,
261261 horizontalalignment = 'center' , verticalalignment = 'center' )
262262
263263
@@ -266,12 +266,12 @@ def test_mathtext_rendering_lightweight(baseline_images, fontset, index, text):
266266@pytest .mark .parametrize (
267267 'fontset' , ['cm' , 'stix' , 'stixsans' , 'dejavusans' , 'dejavuserif' ])
268268@pytest .mark .parametrize ('baseline_images' , ['mathfont' ], indirect = True )
269- @image_comparison (baseline_images = None , extensions = ['png' ],
269+ @image_comparison (baseline_images = None , extensions = ['png' ], style = 'mpl20' ,
270270 tol = 0.011 if platform .machine () in ('ppc64le' , 's390x' ) else 0 )
271271def test_mathfont_rendering (baseline_images , fontset , index , text ):
272272 mpl .rcParams ['mathtext.fontset' ] = fontset
273273 fig = plt .figure (figsize = (5.25 , 0.75 ))
274- fig .text (0.5 , 0.5 , text ,
274+ fig .text (0.5 , 0.5 , text , fontsize = 12 ,
275275 horizontalalignment = 'center' , verticalalignment = 'center' )
276276
277277
@@ -477,7 +477,7 @@ def test_math_to_image(tmp_path):
477477
478478
479479@image_comparison (baseline_images = ['math_fontfamily_image.png' ],
480- savefig_kwarg = {'dpi' : 40 })
480+ savefig_kwarg = {'dpi' : 40 }, style = 'mpl20' )
481481def test_math_fontfamily ():
482482 fig = plt .figure (figsize = (10 , 3 ))
483483 fig .text (0.2 , 0.7 , r"$This\ text\ should\ have\ one\ font$" ,
0 commit comments