@@ -826,16 +826,9 @@ impl<'gc> EditText<'gc> {
826826 /// This `text_transform` is separate from and relative to the base
827827 /// transform that this `EditText` automatically gets by virtue of being a
828828 /// `DisplayObject`.
829- pub fn text_transform ( self , color : Color , baseline_adjustment : Twips ) -> Transform {
829+ pub fn text_transform ( self , color : Color ) -> Transform {
830830 let mut transform: Transform = Default :: default ( ) ;
831831 transform. color_transform . set_mult_color ( color) ;
832-
833- // TODO MIKE: This feels incorrect here but is necessary for correct vertical position;
834- // the glyphs are rendered relative to the baseline. This should be taken into account either
835- // by the layout code earlier (cursor should start at the baseline, not 0,0) and/or by
836- // font.evaluate (should return transforms relative to the baseline).
837- transform. matrix . ty = baseline_adjustment;
838-
839832 transform
840833 }
841834
@@ -1273,12 +1266,11 @@ impl<'gc> EditText<'gc> {
12731266 {
12741267 let baseline = font. get_baseline_for_height ( params. height ( ) ) ;
12751268 let descent = font. get_descent_for_height ( params. height ( ) ) ;
1276- let baseline_adjustment = baseline - params. height ( ) ;
12771269 let caret_height = baseline + descent;
12781270 let mut caret_x = Twips :: ZERO ;
12791271 font. evaluate (
12801272 text,
1281- self . text_transform ( color, baseline_adjustment ) ,
1273+ self . text_transform ( color) ,
12821274 params,
12831275 |pos, transform, glyph : & Glyph , advance, x| {
12841276 if let Some ( glyph_shape_handle) = glyph. shape_handle ( context. renderer ) {
@@ -1633,11 +1625,9 @@ impl<'gc> EditText<'gc> {
16331625 layout_box. as_renderable_text ( self . 0 . text_spans . borrow ( ) . text ( ) )
16341626 {
16351627 let mut result = 0 ;
1636- let baseline_adjustment =
1637- font. get_baseline_for_height ( params. height ( ) ) - params. height ( ) ;
16381628 font. evaluate (
16391629 text,
1640- self . text_transform ( color, baseline_adjustment ) ,
1630+ self . text_transform ( color) ,
16411631 params,
16421632 |pos, _transform, _glyph : & Glyph , advance, x| {
16431633 if local_position. x >= x {
0 commit comments