Repository navigation
fix(layout): move the lines a shape placed up reaches below it, as Hancom does - #454
Merged
Merged
Conversation
…ncom does Hancom places a top-and-bottom shape set up from its paragraph's top from where that top would be, and moves the lines before it on the page whose foot reaches into its band to the band's foot, the lines after them following as they stood; the shape's own paragraph line comes after them, clear of it. The page estimate now does the same (unsupported when a moved line would pass the page foot, or tables, objects or notes are among the moved lines). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
리뷰 결과: 병합합니다. 띠에 걸린 앞 줄을 |
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.
바뀐 점
#453의 후속이다. 쪽 수 추정이 문단 위로 올려 놓은 도형의 띠에 걸린 앞 줄을, 한/글처럼 도형 아래로 옮긴다.
한/글의 동작
빈 문단에 홀로 든 위아래 배치 도형이 문단 기준 음수
vertOffset(파일에는 부호 없는 32비트)으로 놓였을 때:[문단 위 + 오프셋, 그 + 도형 높이]다.예: 높이 5000 사각형을 1500 위로 둔 문단(원래 위 20000)이면 띠는 18500~23500이다.
코드
layout/pages.py_Para.rises: 오프셋, 도형 높이, 문단 자신의 줄 높이와 진행을 담는다._rises(새 함수): 어떤 도형이 이 경우인지 가린다._Paginator._below_a_rising_object(새 메서드): 띠에 걸린 앞 줄을 찾아 옮긴다.테스트
tests/test_layout_page_estimate.py의HANCOM_PAGES에 한/글 저장본 다섯 개를 넣는다.pages_para_shape_unsigned_offsettests/test_layout_page_estimate.py와tests/test_shape_position_frames.py는 1,391건 통과한다.🤖 Generated with Claude Code