@@ -388,10 +388,12 @@ impl TextPipeline {
388388 layout_info. run_geometry . push ( RunGeometry {
389389 section_index,
390390 bounds : Rect :: new (
391- glyph_run. offset ( ) ,
392- line. metrics ( ) . min_coord ,
393- glyph_run. offset ( ) + glyph_run. advance ( ) ,
394- line. metrics ( ) . max_coord ,
391+ line. metrics ( ) . inline_min_coord + glyph_run. offset ( ) ,
392+ line. metrics ( ) . block_min_coord ,
393+ line. metrics ( ) . inline_min_coord
394+ + glyph_run. offset ( )
395+ + glyph_run. advance ( ) ,
396+ line. metrics ( ) . block_max_coord ,
395397 ) ,
396398 strikethrough_y : glyph_run. baseline ( ) - run. metrics ( ) . strikethrough_offset ,
397399 strikethrough_thickness : run. metrics ( ) . strikethrough_size ,
@@ -561,21 +563,14 @@ impl TextMeasureInfo {
561563 // whenever a canonical state is required.
562564 let layout = & mut computed. layout ;
563565 layout. break_all_lines ( bounds. width ) ;
564- layout. align ( bounds . width , Alignment :: Start , AlignmentOptions :: default ( ) ) ;
566+ layout. align ( Alignment :: Start , AlignmentOptions :: default ( ) ) ;
565567 buffer_dimensions ( layout)
566568 }
567569}
568570
569571fn layout_with_bounds ( layout : & mut Layout < TextBrush > , bounds : TextBounds , justify : Justify ) {
570572 layout. break_all_lines ( bounds. width ) ;
571-
572- let container_width = if bounds. width . is_none ( ) && justify != Justify :: Left {
573- Some ( layout. width ( ) )
574- } else {
575- bounds. width
576- } ;
577-
578- layout. align ( container_width, justify. into ( ) , AlignmentOptions :: default ( ) ) ;
573+ layout. align ( justify. into ( ) , AlignmentOptions :: default ( ) ) ;
579574}
580575
581576/// Calculate the size of the text area for the given buffer.
0 commit comments