@@ -216,6 +216,11 @@ def get_text_width_height_descent(self, s, prop, ismath):
216216 # docstring inherited
217217
218218 if ismath in ["TeX" , "TeX!" ]:
219+ if ismath == "TeX!" :
220+ cbook ._warn_deprecated (
221+ "3.3" , message = "Support for ismath='TeX!' is deprecated "
222+ "since %(since)s and will be removed %(removal)s; use "
223+ "ismath='TeX' instead." )
219224 # todo: handle props
220225 texmanager = self .get_texmanager ()
221226 fontsize = prop .get_size_in_points ()
@@ -238,6 +243,7 @@ def get_text_width_height_descent(self, s, prop, ismath):
238243 d /= 64.0
239244 return w , h , d
240245
246+ @cbook ._delete_parameter ("3.2" , "ismath" )
241247 def draw_tex (self , gc , x , y , s , prop , angle , ismath = 'TeX!' , mtext = None ):
242248 # docstring inherited
243249 # todo, handle props, angle, origins
@@ -248,7 +254,7 @@ def draw_tex(self, gc, x, y, s, prop, angle, ismath='TeX!', mtext=None):
248254 Z = texmanager .get_grey (s , size , self .dpi )
249255 Z = np .array (Z * 255.0 , np .uint8 )
250256
251- w , h , d = self .get_text_width_height_descent (s , prop , ismath )
257+ w , h , d = self .get_text_width_height_descent (s , prop , ismath = "TeX" )
252258 xd = d * sin (radians (angle ))
253259 yd = d * cos (radians (angle ))
254260 x = round (x + xd )
0 commit comments