@@ -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.
@@ -893,16 +900,8 @@ def get_extent(self, renderer):
893900 yd_new = 0.5 * h - 0.5 * (h_ - d_ )
894901 self ._baseline_transform .translate (0 , yd - yd_new )
895902 yd = yd_new
896-
897903 else : # single line
898-
899904 h_d = max (h_ - d_ , h - yd )
900-
901- if self .get_minimumdescent ():
902- # To have a minimum descent, i.e., "l" and "p" have same
903- # descents.
904- yd = max (yd , d_ )
905-
906905 h = h_d + yd
907906
908907 ha = self ._text .get_horizontalalignment ()
@@ -1300,7 +1299,7 @@ def __init__(self, s, loc, pad=0.4, borderpad=0.5, prop=None, **kwargs):
13001299 raise ValueError (
13011300 'Mixing verticalalignment with AnchoredText is not supported.' )
13021301
1303- self .txt = TextArea (s , textprops = prop , minimumdescent = False )
1302+ self .txt = TextArea (s , textprops = prop )
13041303 fp = self .txt ._text .get_fontproperties ()
13051304 super ().__init__ (
13061305 loc , pad = pad , borderpad = borderpad , child = self .txt , prop = fp ,
0 commit comments