@@ -775,6 +775,8 @@ class TextArea(OffsetBox):
775775 width and height of the TextArea instance is the width and height of its
776776 child text.
777777 """
778+
779+ @cbook ._delete_parameter ("3.4" , "minimumdescent" )
778780 def __init__ (self , s ,
779781 textprops = None ,
780782 multilinebaseline = None ,
@@ -794,8 +796,9 @@ def __init__(self, s,
794796 If `True`, baseline for multiline text is adjusted so that it is
795797 (approximately) center-aligned with singleline text.
796798
797- minimumdescent : bool, optional
798- If `True`, the box has a minimum descent of "p".
799+ minimumdescent : bool, default: True
800+ If `True`, the box has a minimum descent of "p". This is now
801+ effectively always True.
799802 """
800803 if textprops is None :
801804 textprops = {}
@@ -835,16 +838,20 @@ def get_multilinebaseline(self):
835838 """
836839 return self ._multilinebaseline
837840
841+ @cbook .deprecated ("3.4" )
838842 def set_minimumdescent (self , t ):
839843 """
840844 Set minimumdescent.
841845
842846 If True, extent of the single line text is adjusted so that
843- it has minimum descent of "p"
847+ its descent is at least the one of the glyph "p".
844848 """
849+ # The current implementation of Text._get_layout always behaves as if
850+ # this is True.
845851 self ._minimumdescent = t
846852 self .stale = True
847853
854+ @cbook .deprecated ("3.4" )
848855 def get_minimumdescent (self ):
849856 """
850857 Get minimumdescent.
@@ -894,16 +901,8 @@ def get_extent(self, renderer):
894901 yd_new = 0.5 * h - 0.5 * (h_ - d_ )
895902 self ._baseline_transform .translate (0 , yd - yd_new )
896903 yd = yd_new
897-
898904 else : # single line
899-
900905 h_d = max (h_ - d_ , h - yd )
901-
902- if self .get_minimumdescent ():
903- # To have a minimum descent, i.e., "l" and "p" have same
904- # descents.
905- yd = max (yd , d_ )
906-
907906 h = h_d + yd
908907
909908 ha = self ._text .get_horizontalalignment ()
@@ -1301,7 +1300,7 @@ def __init__(self, s, loc, pad=0.4, borderpad=0.5, prop=None, **kwargs):
13011300 raise ValueError (
13021301 'Mixing verticalalignment with AnchoredText is not supported.' )
13031302
1304- self .txt = TextArea (s , textprops = prop , minimumdescent = False )
1303+ self .txt = TextArea (s , textprops = prop )
13051304 fp = self .txt ._text .get_fontproperties ()
13061305 super ().__init__ (
13071306 loc , pad = pad , borderpad = borderpad , child = self .txt , prop = fp ,
0 commit comments