File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ ### Apply correct margin box when creating or switching pages
6+
7+ When creating a new page or returning to a page previously created, compute the margin box correctly.
8+
9+ (Dan Allen, [ #1122 ] ( https://github.com/prawnpdf/prawn/pull/1022 ) )
10+
511### Look for glyph in correct font
612
713Take the font style into account when looking for a glyph and fallback fonts are enabled.
Original file line number Diff line number Diff line change @@ -723,15 +723,17 @@ def generate_margin_box
723723 ( page . margins [ :top ] + page . margins [ :bottom ] )
724724 )
725725
726- # This check maintains indentation settings across page breaks
726+ # update bounding box if not flowing from the previous page
727+ unless @bounding_box &.parent
728+ old_margin_box = @bounding_box
729+ @bounding_box = @margin_box
730+ end
731+
732+ # maintains indentation settings across page breaks
727733 if old_margin_box
728734 @margin_box . add_left_padding ( old_margin_box . total_left_padding )
729735 @margin_box . add_right_padding ( old_margin_box . total_right_padding )
730736 end
731-
732- # we must update bounding box if not flowing from the previous page
733- #
734- @bounding_box = @margin_box unless @bounding_box &.parent
735737 end
736738
737739 def apply_margin_options ( options )
You can’t perform that action at this time.
0 commit comments