Skip to content

fix(#1302): 미주 다줄 문단 다음 같은 미주 연속 문단 줄간격 과소 수정#1303

Closed
planet6897 wants to merge 1 commit into
edwardkim:develfrom
planet6897:fix/endnote-multiline-continuation-spacing-1302
Closed

fix(#1302): 미주 다줄 문단 다음 같은 미주 연속 문단 줄간격 과소 수정#1303
planet6897 wants to merge 1 commit into
edwardkim:develfrom
planet6897:fix/endnote-multiline-continuation-spacing-1302

Conversation

@planet6897

Copy link
Copy Markdown
Contributor

문제 (closes #1302)

3-11월_실전_통합_2022 18쪽 좌측 단 미주: 다줄 문단 pi=852(분수 포함 키 큰 줄) 마지막 줄
"극솟값…갖는다" 다음, 같은 문제(문30) 연속 텍스트 문단 pi=853 "(나)를 고려하기…" 줄간격이
과소(12px, PDF 한글2022 기준 ~18px).

원인

height_cursor.rs::vpos_adjustcompact_endnote_page_tail_backtrack(page-path compact 미주
하단 frame-fit 보정)이 컬럼 하단의 같은 미주 연속 문단에까지 발동. page_base 절대매핑(end_y)이
다줄 문단 로컬앵커 대비 ~20px drift 하면서 end_y < y_offset - 8 성립 →
end_y.max(prev_content_bottom_y).min(y_offset) 가 trailing 줄간격(~6px)을 깎음.

핵심: stored vpos delta(curr_first - prev_vpos = 1502HU = prev_lh + prev_ls)는 정상 한 줄
전진
을 인코딩하는데 backtrack 이 overlap 으로 오인. 기존 #1236(중간 컬럼 trailing)·#1246
rescue(다음이 "문" 제목일 때만)는 이 연속(비제목)+컬럼 하단 경계를 미커버.

수정 (조건 게이트)

backtrack 은 stored 가 overlap(작은/rewind gap)을 가리키는 tail 에만 적용해야 한다. curr 첫 줄
stored vpos 가 정상 한 줄 전진(lh+ls) 이상을 인코딩하는 breakable 텍스트 연속은 비발동
(y_offset=trailing 포함 정답 유지). 수식-only tail(#1274)은 atomic 이라 제외 — frame-fit
backtrack 유지.

검증

  • 18쪽 극솟값→(나)를 gap: 12 → 18px (PDF 정합). 회귀 핀 테스트 issue_1302_...page18 추가
    (수정 전 FAIL=14 → 후 PASS=18).
  • 전체 cargo test: 2036 passed, 0 failed.
  • 회귀 diff(pristine vs 수정): 3-11월 18쪽만 변경(trailing 복원, 페이지수 21 불변),
    3-10월 9쪽도 동일 버그 인스턴스로 PDF 정합 개선, 3-09월 무변경.

변경 파일

  • src/renderer/height_cursor.rs
  • tests/issue_1139_inline_picture_duplicate.rs

🤖 Generated with Claude Code

compact 미주 page-tail backtrack(height_cursor.rs::vpos_adjust)이 컬럼 하단에서
같은 미주 연속 텍스트 문단에까지 발동해 trailing 줄간격(~6px)을 깎던 문제.
curr 첫 줄 stored vpos 가 정상 한 줄 전진(lh+ls) 이상을 인코딩하는 breakable
텍스트 연속은 backtrack 비활성(y_offset 유지). 수식-only tail(edwardkim#1274)은 atomic
이라 제외하고 frame-fit backtrack 유지.

- 3-11월 18쪽 극솟값→(나)를 gap 12→18px(PDF 정합). 3-10월 9쪽도 동일 개선.
- 회귀 핀 issue_1302_...page18 추가. cargo test 2036 passed.
- 회귀 diff: 영향 페이지 2개 모두 PDF 정합 개선, 페이지수 불변.
@edwardkim edwardkim self-requested a review June 5, 2026 11:35
@edwardkim edwardkim added the enhancement New feature or request label Jun 5, 2026
@edwardkim edwardkim added this to the v1.0.0 milestone Jun 5, 2026
edwardkim added a commit that referenced this pull request Jun 5, 2026
@edwardkim

Copy link
Copy Markdown
Owner

Maintainer review completed.

Accepted the functional change from this PR with one integration guard:

Verification on the integration branch:

  • cargo fmt --all -- --check
  • cargo test --test issue_1139_inline_picture_duplicate issue_1284_2024_between20_page13_question_flow_matches_pdf -- --nocapture
    • 1 passed
  • cargo test --test issue_1139_inline_picture_duplicate issue_1302_2022_nov_page18_multiline_endnote_continuation_keeps_line_spacing -- --nocapture
    • 1 passed
  • cargo test --test issue_1139_inline_picture_duplicate -- --nocapture
    • 68 passed
  • cargo clippy --lib -- -D warnings
  • cargo test
    • passed; lib tests: 1587 passed, 0 failed, 6 ignored
  • maintainer visual judgment passed
  • WASM build and rhwp-studio visual judgment passed

Merged and pushed to devel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants