fix(layout): move objects past the page foot to the next page's top as Hancom does - #383
Merged
airmang merged 3 commits intoOct 2, 2026
Merged
Conversation
…s Hancom does A picture or drawing wrapped square and flowing with the text whose band passed the body's foot was followed only through the layout caches. Hancom sets it at the next page's body top whatever its offset: the lines of its own page are the whole width, and the lines on the next page whose top is above its foot go beside it. The section is now laid out again with the object there: its paragraph and the ones after it the whole width, and the lines reaching it on the next page broken again beside it. A table wrapped square and set not to split moves the same way; one that may split is split over the page end instead and is still followed only through the caches. A picture or drawing placed top and bottom below its empty paragraph's line, flowing with the text, whose foot would pass the body's foot from where the paragraph stands, goes on alone to the next page's top too: the paragraph's line stays, and the lines on the next page reaching it go below it. The estimate sent the paragraph to the next page with it, with the layout caches as well. A line beside an object with text on both sides is two pieces even when its text ends in the first piece or it holds no text; the estimate now counts the empty second piece too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… stood A top-and-bottom object offset from a paragraph of text pushes the paragraph's first line below it. Its band's foot is measured from where that line stood before it was pushed, but both checks of whether the band passes the body's foot added it to the line's new top, so an object ending well above the foot was taken past it: refused before, and sent to the next page by the previous commit. The push is now taken off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…are-object-moved-to-the-next-page # Conflicts: # CHANGELOG.md
Owner
Author
|
커밋 둘을 더했습니다.
전체 테스트, 쪽 수 추정·FormFit 테스트, 게이트를 다시 통과했고, coverage ledger도 main과 같습니다. 본문의 바뀐 점과 테스트 항목도 고쳤습니다. |
airmang
deleted the
fix/page-estimate-square-object-moved-to-the-next-page
branch
October 2, 2026 16:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
바뀐 점
쪽 수 추정(실험,
estimate_pages)이 본문 바닥을 넘는 개체 가운데, 한/글이 통째로 다음 쪽 맨 위로 옮기는 개체를 따르게 한다.pageBreak="NONE")도 그렇게 옮겨 간다.a square-wrapped or offset top-and-bottom object past the page foot)이었다._BandMoves). 그 문단은 개체 없이 다시 만든다._Para.wrap_push,_Para.moves)._Paginator)는 개체 문단의 첫 줄을 놓을 때 다음 쪽 맨 위에 개체의 띠를 둔다(_move_band). 그 쪽은 줄이 없어도 쓰인 쪽으로 센다._at_band,_Reflow.banded). 여러 단의 너비가 다를 때 쓰던 다시 나누기(_Reflow)를 넓혔다.hp:lineseg@flags16번 비트)이다._at_one_height,_in_two_pieces)._Para.wrap_shift). 전에는 밀린 줄 자리에 그림 높이를 한 번 더 더해, 바닥 위에서 끝나는 그림도 바닥을 넘는다고 보아 지원 밖으로 두었다.테스트
tests/test_layout_page_estimate.py의HANCOM_PAGES에 한/글 저장본 열을 더한다(캐시 있음·없음). 그림은 20000×27112이고, 10pt 글에 줄 간격 160%다.test_a_square_object_past_the_page_foot_goes_on_at_the_next_page(이름을 바꿈)🤖 Generated with Claude Code