Task #928: HWP3 표 셀 내 inline 사각형 텍스트 중복 + 폰트 + 그림 중복 해소#933
Closed
jangster77 wants to merge 9 commits into
Closed
Conversation
- 수행계획서 작성 - Stage 1 측정: SVG y=421.73 / y=423.12 두 baseline 에 동일 paragraph 2회 emit - 회귀는 Control::Shape tac=true wrap=TopAndBottom 한정 (그림 컨트롤 정상) - Stage 2 에서 코드 경로 trace 로 가설 확정 예정 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- ROOT CAUSE: table_layout.rs::layout_table_cells 의 Shape 분기 + 트레일링 텍스트 블록 will_render_inline 가드 누락 - Picture 분기는 가드 있어 정상, Shape 만 회귀 (p[2] 그림 3개 vs p[1] 사각형 차이) - Fix 방향 α+β: Shape 분기와 트레일링 블록에 가드 추가, layout_cell_shape 는 inline_shape_position 좌표 사용 - Stage 3~5 단계 구성 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…dwardkim#928 후보) - table_layout.rs::layout_table_cells Shape 분기에 Picture 와 동일한 will_render_inline 가드 추가 - layout_composed_paragraph 가 run_tacs split 으로 텍스트 + inline_shape_position 등록 시 본 분기의 text_before 수동 발행 스킵 - 도형 자체는 get_inline_shape_position 좌표로 layout_cell_shape 호출하여 사라짐 회귀 차단 - exam_kor.hwp 5쪽 다이어그램 행 (가) ⇨ ⇨ (나) 중복 emit 해소 - cargo test --release 1275 unit + 8 svg_snapshot + 기타 모두 통과 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
회귀 1: 사각형 내부 폰트 축소 (15.33 → 6.88px) - shape_layout.rs Task edwardkim#874 edwardkim#3 ratio 축소 로직이 인라인 사각형에 잘못 발동 - 사각형 IR orig=(2925,975) cur=(6518,1983) max_ratio=2.228 → font *= 0.449 - 한컴은 인라인 사각형에서 폰트 자동 축소 안 함 - Fix: layout_textbox_content 에 parent_treat_as_char 인자 추가, tac=true 시 ratio 축소 비활성 - 4 호출자 (Rectangle/Ellipse/Polyline/Curve) 에서 shape.common().treat_as_char 전달 회귀 2: ㉢ 그림 중복 emit - Picture/Shape 가드 (tac_controls + line_chars 기반) boundary 케이스 abs_pos==line_chars 미통과 - paragraph_layout run_tacs filter 는 is_last_run boundary 포함 emit - Fix: 가드를 tree.get_inline_shape_position().is_some() 기반으로 변경 - Equation/Table 분기 (라인 1986, 2079) 와 동일 패턴, paragraph_layout 의 실제 emit 여부 정합 검증: - exam_kor.hwp 5쪽 다이어그램 정상 출력 ((가) ⇨ [A단계] ⇨ (나), 사각형 폰트 정상, ㉠㉡㉢ 3개) - cargo test 1275+ 전체 통과 (hwp-img-001 회귀 차단, svg_snapshot 8/8) - 사용자 시각 검증 완료 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- 회귀 3건 (텍스트 중복 + 사각형 폰트 + ㉢ 그림 중복) 모두 해결 - 한컴 PDF 정합 + 사용자 시각 검증 완료 - cargo test 1275+ 전체 통과, hwp-img-001 회귀 차단 - 가드 패턴 정합 (Picture/Shape/Equation/Table 모두 inline_shape_position 기반) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
7 tasks
edwardkim
pushed a commit
that referenced
this pull request
May 17, 2026
Owner
|
시각 판정 통과. cherry-pick으로 devel 반영 완료. 감사합니다! |
4 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.
Summary
samples/exam_kor.hwp5쪽<보 기>박스 다이어그램 시각 회귀 3건 해소 (closes #928).table_layout.rs::layout_table_cellsShape 분기will_render_inline가드 누락 → 사각형 [A 단계] 주변 `(가) ⇨ ⇨ (나)` 텍스트가 두 baseline 에 평행이동된 채 2회 emit. Picture 분기에는 가드가 있었음.shape_layout.rs::layout_textbox_contentTask shortcut.hwp: Task #866 후속 — PartialParagraph 헤더띠 / Table only 페이지첫 / Stage 2 누적 / 점선 길이 #874 셀 내 TAC 이미지 수직 배치 버그 수정 #3 ratio 축소 로직 (`max_ratio > 1.5 → font *= 1/ratio`) 이 인라인 사각형에 잘못 발동. shortcut.hwp 마스터 페이지 글상자 (tac=false) 케이스용 로직이 범위 과대.Fix 요약
table_layout.rs: Shape 분기에will_render_inline가드 추가. Picture/Shape 가드 시그널을tac_controls + line_chars기반 →tree.get_inline_shape_position(...).is_some()기반으로 변경 (Equation/Table 분기와 동일 패턴, paragraph_layout 의set_inline_shape_position호출 정합).shape_layout.rs:layout_textbox_content시그니처에parent_treat_as_char: bool인자 추가. tac=true 시 ratio 축소 비활성. 4 호출자 (Rectangle/Ellipse/Polyline/Curve) 모두shape.common().treat_as_char전달.CLAUDE.md "HWP3 전용 분기는 src/parser/hwp3/" 규칙은 본 task 미해당 — 회귀 3건 모두 공통 렌더러의 가드/조건/범위 문제.
Test plan
cargo test --release— 1275 unit + 모든 통합 테스트 통과cargo test --test svg_snapshot— 8/8 통과 (KTX/aift/복학원서/exam_kor 6p 포함)test_task76_img_001_four_pictures통과 (hwp-img-001.hwp 4 그림 회귀 차단)samples/exam_kor.hwp5쪽 시각 검증pdf/exam_kor-2022.pdf) 시각 정합 확인상세 문서
mydocs/plans/task_m100_928.mdmydocs/plans/task_m100_928_impl.mdmydocs/plans/task_m100_928_impl_v2.mdmydocs/working/task_m100_928_stage{1..5}.mdmydocs/report/task_m100_928_report.md🤖 Generated with Claude Code