Repository navigation
fix(layout): give picture bullets their room and tabs their section's default stops - #559
Conversation
… default stops A paragraph under a picture bullet (hh:bullet@useImage) loses the room Hancom gives the picture: an em whatever the picture's shape, then the gap (textOffset) and the width adjustment, off the first line and, with 자동 내어 쓰기, off every line. FormFit took it as no label at all, so such paragraphs broke later than in Hancom, and write_line_caches gave them lines Hancom does not lay out. A picture bullet sized by its picture (useInstWidth) still takes no room in FormFit; write_line_caches leaves its paragraphs to Hancom. A tab reaches the default stops of the section it is in, as far apart as hp:secPr@tabStopVal says; the page estimate and write_line_caches counted 4,000 in every section. A section giving its stops in another unit than HWPUNIT gets no caches. Both came up once write_line_caches wrote the sections around objects text runs beside (#554). Two Hancom-saved fixtures show the layouts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
airmang
left a comment
There was a problem hiding this comment.
head d44466dd8bc0b6ec799221d50f6e84bc17392ffe를 검토했습니다. picture-bullet → paragraph_label → label_room/문단 head/indent 경로, useInstWidth의 보수적 캐시 조건, _Measure.style의 section tab-stop별 캐시 키, 구역·가상 구역 전환에서의 기본값 재설정 및 명시적 tab-stop 유지, writer의 비HWPUNIT 구역 생략을 주변 코드와 확인했습니다. 저장된 Hancom fixture의 줄/탭 속성 비교를 검토했으며 재현 가능한 미해결 결함은 발견하지 못했습니다.
정확한 head의 CI13개 성공 및 Python3.12 로그의 7,114 passed / 18 skipped / 1 xfailed, coverage90.14%, Ruff·mypy·pyright 통과 확인. 별도 head 체크아웃에서 FormFit 규칙·line-cache·page-estimate 테스트 1,758개 통과.
#558 병합 뒤 최신 main 708a854247530427f6aeaaf99b67eb1ba6c502a5와 로컬에서 충돌 없이 합쳤습니다. tree 9c5b3704f839273de32efbcd2f6db7a13fee05eb는 검증한 head와 소스·테스트가 동일하며, 차이는 최신 README/ledger와 기존 main의 개발 상태 classifier(Alpha→Beta)뿐임을 확인했습니다. 최신 main의 문서·메타데이터를 보존하며 버전·의존성 변경은 없습니다.
자기 PR이므로 COMMENT로 결과를 남깁니다. 병합 직전에 head/main/CI/리뷰 상태를 재확인합니다.
What
hh:bullet@useImage): FormFit and the page estimate now give the label the room Hancom gives it — the picture takes an em whatever its shape, then the gap (textOffset, % of the em or HWPUNIT) and the width adjustment, off the first line and, with 자동 내어 쓰기, off every line. Before, a picture bullet counted as no label, so its paragraphs broke later than in Hancom andwrite_line_cacheswrote lines Hancom does not lay out. A picture bullet sized by its picture (useInstWidth) still takes no room in FormFit, andwrite_line_cachesleaves its paragraphs to Hancom.hp:secPr@tabStopValsays (HWPUNIT). The page estimate andwrite_line_cachescounted 4,000 in every section. A section giving its stops in another unit gets no caches.Both turned up once
write_line_cachesbegan writing the sections around objects text runs beside and newspaper columns (#554): those sections used to be skipped whole.Tests
useInstWidth(no room).tests/fixtures/hancom_saved/README.mdsays) joinHANCOM_LAID_OUT:line_cache_picture_bullets.hwpx,line_cache_section_tab_stops.hwpx.Saving without calling
write_line_cachesis unchanged apart from FormFit's and the page estimate's widths for these paragraphs.🤖 Generated with Claude Code