Task #1027: 세로 측정 정합 — 페이지네이터↔렌더러 (노트 8쪽) (closes #1027)#1032
Closed
planet6897 wants to merge 1 commit into
Closed
Task #1027: 세로 측정 정합 — 페이지네이터↔렌더러 (노트 8쪽) (closes #1027)#1032planet6897 wants to merge 1 commit into
planet6897 wants to merge 1 commit into
Conversation
…1027) 페이지네이터(typeset.rs)가 단락마다 total_height 를 누적해 렌더러(layout.rs VPOS_CORR)보다 과측정 → 주석("※ 추진일정은…")이 한컴 2022 PDF 의 8쪽이 아닌 9쪽으로 밀리던 문제(edwardkim#1022 후속) 해결. 공유 측정 엔진: - src/renderer/height_cursor.rs (신규): 렌더러 inter-item VPOS_CORR 상태머신을 HeightCursor 로 추출(page/lazy base, prev, ≤8px 백워드 클램프, overlay/분할표 bypass). edwardkim#1022 v2 trailing-ls 조건부 lazy_base 보정 포함. parity 단위테스트 8. - layout.rs: VPOS_CORR 클램프·overlay 가드를 순수 함수로 추출, build_single_column 이 HeightCursor 에 위임(무동작 — svg_snapshot 8/8 유지). - typeset.rs(단단): 항목 fit 직전 HeightCursor::vpos_adjust 로 current_height 를 vpos 에 스냅(누적 drift 제거); treat_as_char 인라인 표를 호스트 LINE_SEG 로 advance; atomic top-fit 스필에서 위아래 글상자 제외(다음 페이지로 넘김). 결과(AI 184p, 한컴 2022 PDF 정합): 주석 9→8쪽, 글상자 10쪽, LAYOUT_OVERFLOW 27→18. svg_snapshot 8/8, lib 1316. 다단(col_count>1)·분할표는 후속(edwardkim#412 per-column base). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
edwardkim
added a commit
that referenced
this pull request
May 20, 2026
@planet6897 22번째 PR (분할 표·측정 시리즈 마무리) — `HeightCursor` 공유 측정 엔진으로 페이지네이터(`typeset.rs`)와 렌더러(`layout.rs build_single_column`)의 inter-item VPOS_CORR 측정 공간 일치. 본질: - 신규 `src/renderer/height_cursor.rs` (+333) — VPOS_CORR 상태머신 캡슐화 (page/lazy base + prev + partial_table + overlay bypass + ≤8px backward clamp + stale TopAndBottom guard) + parity 단위 테스트 7개. - `src/renderer/layout.rs` (+96/-233) — 230줄 inline 로직 → `HeightCursor::vpos_adjust` 위임 + `vpos_corrected_end_y()` / `para_has_overlay_shape()` 순수 함수 추출 (Stage A/B/C 무동작). - `src/renderer/typeset.rs` (+119/-2): - Stage D: fit 직전 `vpos_snap_current_height` 호출 → 누적 drift 제거 (단단 한정, col_count!=1 가드). - Stage E1: treat_as_char 인라인 표 advance 정합 (host LINE_SEG fmt.total_height, +16.9px). - Stage E2: atomic top-fit 60px 스필에서 TopAndBottom Shape 제외 (한컴이 본문 항목처럼 다음 페이지로 넘김). 검증 (본 환경): - cargo test --release --lib **1317 passed** (+8 parity) - cargo test --release --tests 모든 통합 passed (issue_852 5/5 포함) - cargo fmt --all --check clean - cargo clippy 본 PR 변경 0 warnings - sweep 7 fixtures: hwp3-sample16-hwp5 40 diff (의도된 측정 정합, Stage E1 효과, 페이지 수 64→64 불변) / 다른 6 fixtures diff=0 - WASM Docker 빌드 4.86MB + rhwp-studio 동기화 - 작업지시자 시각 판정 통과 자연 cherry-pick 영역: - PR base = 7ec2e25 (PR #1031 이전), origin/devel = d359c30 - cherry-pick 자연 통합 — PR #1031 (build_page_borders 4 hunk) 영역 보존 + 본 PR (build_single_column 추출) 영역 양립 - HWP3 외곽선 paper-edge 정합 (PR #1031) 회귀 부재 확인 검증 권위 PR 본문 명시 (AI 184p 비공개 fixture, 본 환경 미접근): - 노트 "추진일정은" 9쪽→8쪽 한컴 2022 PDF 정합 - 글상자 pi=142 10쪽 정합 - LAYOUT_OVERFLOW 27→18 다단 (col_count>1) Stage E3 비범위 — #412 per-column base 선행 필요 (컨트리뷰터 명시 후속). closes #1027 Co-Authored-By: Jaeook Ryu <planet6897@users.noreply.github.com>
Owner
|
Merged via cherry-pick (commit e18fe26, author @planet6897 보존) into devel 본 환경 검증 통과: cargo test 1317 + 통합 + clippy/fmt + sweep 7 fixtures (sample16-hwp5 의도된 측정 정합 / 다른 6 diff=0) + WASM 4.86MB + 작업지시자 시각 판정. PR base = 7ec2e25 (PR #1031 이전), origin/devel = d359c30 (PR #1031 머지 후). cherry-pick 자연 통합으로 PR #1031 (build_page_borders 4 hunk) 영역 + 본 PR (build_single_column 추출) 영역 양립 — HWP3 외곽선 paper-edge 정합 회귀 부재 확인. 다단 (col_count>1) 측정 정합은 #412 per-column base 선행 필요로 본 PR 비범위 (Stage E3 후속). closes #1027 |
edwardkim
added a commit
that referenced
this pull request
May 20, 2026
PR #1032 (closes #1027) 머지 후속 처리: - mydocs/pr/archives/pr_1032_review.md (검토 문서 archives 이동) - mydocs/orders/20260520.md (PR #1032 entry 추가) - rhwp-studio/public/{rhwp.d.ts,rhwp.js,rhwp_bg.wasm} (WASM 4.86MB 동기화) @planet6897 분할 표·측정 시리즈 마무리 (#1003+#1004+#1024+#1032). HeightCursor 공유 측정 엔진 + parity 7개로 페이지네이터↔렌더러 정합. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
edwardkim
added a commit
that referenced
this pull request
May 20, 2026
@planet6897 23번째 PR (분할 표·측정 시리즈 5번째 마지막 마디: #1003→#1004→#1024→#1032→#1033). page-larger 단일 표 셀 (PMR-007 세부내용 셀 25문단 ≈ 1024px) 이 rowspan 라벨 셀 (rs=2) 이 걸친 행에 있어 `advance_row_cut` 의 row_span==1 셀만 다루는 #993 컷 모델에서 원자 처리되어 본문 143px 초과·용지 밖 잘림. row-block 컷으로 일반화. 본질: - src/renderer/layout/table_layout.rs (+170): `advance_row_block_cut` 신규 — rowspan 블록 [b_start, b_end) 셀을 (row,col) 순서로 순회, 거대 row_span==1 셀 줄 단위 분할, rs>1 라벨 셀 첫 조각 전량 소비 + 연속 조각 공란. + `row_block_cells` / `row_block_content_height` 헬퍼 (페이지네이터·렌더러 단일 권위). + parity 단위 테스트 2건 (단일 비-rowspan 행 = advance_row_cut 동등 + rowspan 거대 셀 분할). - src/renderer/pagination.rs (+6): PageItem::PartialTable.is_block_split 플래그 추가 — page-larger 분할만 새 모드, 기존 분할 (form-002 등) 은 false 유지 (backward-compatible). - src/renderer/layout/table_partial.rs (+170/-29): is_block_split=true 렌더 — rowspan 행 포함, rowspan_block_range/block_cut_index 로 블록-셀 인덱싱, rs>1 라벨 셀 연속 공란. - src/renderer/typeset.rs (+83/-6): mid-page 분할 게이트 (block_h > base_available 일 때만 진짜 page-larger 활성, 아니면 deferred). 연속분 행-스킵 가드 블록 컷에서 스킵 (컷 보존). - src/renderer/{layout.rs, page_number.rs, pagination/engine.rs, document_core/queries/rendering.rs} 최소 변경. 검증 (본 환경): - cargo test --release --lib **1319 passed** (+2 block_cut tests) - cargo test --release --tests 모든 통합 passed (issue_852 5/5 + svg_snapshot 8/8 + table-vpos-01 13/13 + issue_938 3/3 등) - cargo fmt --all --check clean - cargo clippy 통과 - sweep 7 fixtures: **diff=0 전체** — page-larger 케이스가 공개 fixture 에 없음. PR #1031/#1032 회귀 부재 + 일반 분할 form/일반 fixture 무변경 입증 - WASM Docker 빌드 4.89MB (+30KB) + rhwp-studio 동기화 - 작업지시자 시각 판정 통과 cherry-pick 자연 통합: - PR base = a52859d (PR #1032 이전), origin/devel = 5263f53 - cherry-pick auto-merge 로 PR #1031 (build_page_borders) + PR #1032 (HeightCursor / vpos_snap_current_height 13건) 영역 자동 보존 - PR #1033 변경 (advance_row_block_cut + is_block_split) 통합 검증 권위 PR 본문 명시 (AI 184p 비공개 RFP, 본 환경 미접근): - LAYOUT_OVERFLOW 27→25 - pi=272 세부 셀 (854.9px) 해소 - pi=324 PMR-007 (143.9px) 2-프래그먼트 분할 한컴 2022 PDF 정합 @planet6897 분할 표·측정 시리즈 마무리 (#1003+#1004+#1024+#1032+#1033). closes #1025 Co-Authored-By: Jaeook Ryu <planet6897@users.noreply.github.com>
This was referenced May 20, 2026
edwardkim
added a commit
that referenced
this pull request
May 20, 2026
PR #1033 (closes #1025) 머지 후속 처리: - mydocs/pr/archives/pr_1033_review.md (검토 문서 archives 이동) - mydocs/orders/20260520.md (PR #1033 entry 추가) - rhwp-studio/public/{rhwp.d.ts,rhwp.js,rhwp_bg.wasm} (WASM 4.89MB 동기화) @planet6897 분할 표·측정 시리즈 마무리 5번째 마지막 마디 (#1003+#1004+#1024+#1032+#1033). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
edwardkim
added a commit
that referenced
this pull request
May 20, 2026
…격차 종합 정정 @jangster77 25+번째 PR (paper_based outline 시리즈 #1011/#1015/#1031 마무리 후 HWP3 sample16 정합 시리즈 진입). samples/hwp3-sample16.hwp 한컴 한글 정답지 비교 4 격차 종합 정정. src/parser/hwp3/ 격리 엄격 (HWP5/HWPX/renderer 무수정). 본문 가설 정반대 발견: 원본 이슈 가설(HWP5 변환본 gradient strip) 이 한컴 한글 정답지 시각 검증 결과 정반대로 판명 (gradient 가 정답, HWP3 회귀). issue body + 수행/구현계획서 v2 재작성 — feedback_visual_judgment_authority 모범 사례. 본질 (2 코드 + 1 test + 9 문서): - 격차 A — HWP3 Shape gradient IR 매핑 (drawing.rs:792~830): HWP3 raw Hwp3DrawingObjectGradientAttr 가 이미 파싱되었으나 Fill IR 구축에서 fill_type=Solid 하드코딩으로 데이터 무시. HWP5 doc_info.rs:404 와 동일 contract 로 GradientFill 주입. - 격차 B — Shape border LineType 2~7 → Solid normalize (drawing.rs:758~785): HWP3 raw style=0x0002 (LineType=2 Dash) 가 점선 렌더되나 한컴은 실선. sample16 한정 분포 — narrow fix 회귀 risk 0. - 격차 C — HWP3 heading decoration 휴리스틱 strip (mod.rs:2870~2960): "═════■ 1.추진목적 ■═════" 형태 decoration 을 fixup_hwp3_heading_decoration + strip_heading_decoration 패턴 detection 으로 strip. 한컴 변환기 mimic. - 격차 D-1 — CharShape dedupe (mod.rs:1869~1900): 같은 start_pos 에 rep + inline shape change 양쪽 push 시 마지막 (inline override) 유지. - 격차 D-2 — 폰트명 매핑 (mod.rs:2570~2585, 2908~2924): "신명조"→"HY신명조" 등 5 legacy 매핑 + font.alt_name 원본 보존. HWP3 SVG 좌표가 HWP5 변환본과 byte-for-byte 일치. 검증 (본 환경): - cargo test --release --lib 1319 passed - cargo test --release --tests 모든 통합 passed - cargo test --release --test issue_1008_gradient **4/4 passed**: hwp3_sample16_business_box_has_gradient, _border_solid, _heading_decoration_stripped, _font_name_mapped_to_hwp5_convention - cargo fmt --all --check clean - sweep 9 fixtures: hwp3-sample16 **44 diff** (의도된 본 PR 본질, 페이지 수 64→64 불변) / 다른 8 fixtures (HWP5/HWPX 변환본 + sample10/11/sample + exam_kor/aift/biz_plan) **diff=0** — HWP3 격리 검증, PR #1031/#1032/ #1033 회귀 부재 - SVG 본질 검증: cover <radialGradient id="grad1" #c8ccf8→#ffffff> 추가 + 폰트 "신명조"→"HY신명조" 매핑 - WASM Docker 빌드 4.89MB + rhwp-studio 동기화 - 작업지시자 시각 판정 통과 squash 적용: - PR base = 5263f53 (PR #1032 후 docs commit) — PR #1033 (01a8c75) 미흡수 - cherry-pick 직접 머지 대신 본질 파일만 origin/devel 위에 squash 적용 (src/parser/hwp3/{drawing.rs, mod.rs} + tests/issue_1008_gradient.rs + 문서 8 파일, 총 11 파일) - 결과: PR #1033 영역 (src/renderer/*, advance_row_block_cut, is_block_split) 자동 보존 + 본 PR 본질 적용 한계 (PR 본문 명시): - 휴리스틱 (격차 C): HWP3 spec 미참조 패턴 detection — 의도된 "═══...■...■═══" typography 회귀 risk. sweep diff=0 으로 1차 입증 - 폰트 매핑 5 legacy 한정: 다른 명칭 발견 시 확장 필요 - 공백 cosmetic 비범위: rhwp "1.추진목적" vs 한컴 "1. 추진목적" period 뒤 공백 — HWP3 raw 부재, 한컴 자동 삽입 closes #1008 Co-Authored-By: Taesup Jang <tsjang@gmail.com>
9 tasks
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.
문제 (#1022 후속)
페이지네이터(
typeset.rs)가 단락마다total_height를 누적해 렌더러(layout.rsVPOS_CORR)보다 과측정 → 한 줄 주석("※ 추진일정은 …")이 한컴 2022 PDF 의 8쪽이 아닌 9쪽으로 밀림.해결 — 공유 측정 엔진
src/renderer/height_cursor.rs(신규): 렌더러 inter-item VPOS_CORR 상태머신을HeightCursor로 추출 (page/lazy base, prev 추적, ≤8px 백워드 클램프, overlay-shape/분할표 bypass). M100: HeightMeasurer ↔ cell_units 측정 정합 (task993 LAYOUT_OVERFLOW 50건 회귀 해소) #1022 v2 trailing-ls 조건부lazy_base보정 포함. parity 단위테스트 8건.layout.rs: VPOS_CORR 클램프·overlay 가드를 순수 함수로 추출,build_single_column이HeightCursor에 위임 (무동작 —svg_snapshot8/8 유지).typeset.rs(단단): 항목 fit 직전HeightCursor::vpos_adjust로current_height를 vpos 에 스냅 (누적 drift 제거); treat_as_char 인라인 표를 호스트 LINE_SEG 로 advance; atomic top-fit 스필에서 위아래(TopAndBottom) 글상자 제외.검증 (AI 제안요청서 184p, 한컴 2022 PDF 정합)
비범위 (후속)
🤖 Generated with Claude Code