fix(#1300): 수식 위첨자를 base 상단에 정렬 — 키 큰 base 윗줄 침범 해소#1301
Closed
planet6897 wants to merge 2 commits into
Closed
Conversation
- 17쪽 [다른 풀이] 수식 겹침은 현재 devel SVG/캔버스에서 재현 안 됨 - 원인: studio가 옛 WASM 빌드로 동작(미주 겹침은 edwardkim#1256/edwardkim#1257/#1261에서 수정됨) - 재발 방지: stale WASM phantom-bug 트러블슈팅 기록
괄호 분수 등 키 큰 base의 위첨자가 baseline 위로 과하게 치솟아 윗줄을 침범하던 문제(예: (1/6)^4 의 4 가 윗줄로 떠오름)를 해소. layout_superscript 에서 base 를 baseline 비례로 밀던 것을 제거하고 위첨자 상단을 base 상단에 정렬. - base_y = (s.height - b.height).max(0.0) - 회귀 테스트 test_superscript_tall_base_no_overshoot 추가 - cargo test 2037 passed, 0 failed. 한글 2022 PDF 정합(SVG·studio 캔버스 확인)
edwardkim
added a commit
that referenced
this pull request
Jun 5, 2026
edwardkim
added a commit
that referenced
this pull request
Jun 5, 2026
Owner
|
Maintainer review completed. Applied the code change from this PR to
Verification:
The change has been merged and pushed to |
edwardkim
added a commit
that referenced
this pull request
Jun 5, 2026
edwardkim
added a commit
that referenced
this pull request
Jun 5, 2026
Martinel2
pushed a commit
to Martinel2/rhwp
that referenced
this pull request
Jun 7, 2026
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.
개요
괄호 분수 등 키 큰 base의 위첨자(지수)가 baseline 위로 과하게 치솟아 윗줄을 침범하던 문제를 해소합니다. (예:
(1/6)⁴의4가 윗줄 "의 2가지 경우이므로"로 떠올라 "이므₄로"처럼 보임)samples/3-09월_교육_통합_2022.hwpx17쪽 [다른 풀이]원인
src/renderer/equation/layout.rslayout_superscript:base_y(base 밀어내기)가b.baseline에 비례 → 키 큰 base에서 합성 baseline이 자연 baseline의 약 2배가 되어 위첨자가 한 줄 위로 치솟음.수정
위첨자 상단을 base 상단에 정렬(base를 아래로 밀지 않음):
x⁴,6⁴): 정상 우상단 첨자.검증
(1/6)⁴지수가 괄호 우상단 모서리, 윗줄 미침범 — 한글 2022 PDF 정합. SVG·rhwp-studio 캔버스(WASM 재빌드) 양쪽 확인.cargo test2037 passed, 0 failed. 회귀 테스트test_superscript_tall_base_no_overshoot추가, 기존test_superscript_fraction_baseline(exam_math_no.hwp 수식 위첨자 baseline이 낮게 배치되어 지수가 본문 기준선 아래로 렌더링됨 #532) 통과.커밋
docs(#1297)— 미주 수식 겹침 조사(현재 코드 재현 안 됨, 옛 WASM 빌드 원인) + stale-WASM 재발방지 기록fix(#1300)— 위첨자 상단 정렬 + 회귀 테스트🤖 Generated with Claude Code