Files
GhiVideo_v4/docs/history/2026-07-03_1330_단독그림-글자잘림-PIL재렌더.md
T
b23042andClaude Fable 5 d38b842e8d GhiVideo 소스 복제 — v4 작업 시작 기준
기존 GhiVideo 저장소 HEAD의 트래킹 소스 362개 파일을 복제.
(node_modules·storage·빌드 산출물·대용량 미디어는 .gitignore 규칙대로 제외)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 14:32:51 +09:00

31 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 단독 그림(시간↔측점 대응표) 글자 아랫부분 잘림 수정 — PIL 재렌더
**소요 시간**: 약 10분
**Context 사용량**: input ~165k / output ~5k tokens
## 증상 (사용자 제보)
- `docs/그림_시간측점대응표.png` 글자들의 **아랫부분이 조금씩 잘려** 보임.
## 원인
- 확대 검증 결과 weasyprint(61.2)의 SVG `<text>` 렌더러가 **베이스라인 아래 획(디센더)을 클리핑**함.
- "fps"의 p 꼬리가 잘려 "fos"처럼 보임, "드론·기록" 등 한글 하단 획 일부 손상.
- 이전 파이프라인: 인라인 SVG → weasyprint PDF → fitz PNG. (SVG 텍스트가 weasyprint를 지나는 순간 발생)
## 수정
- 렌더러 교체: **PIL 직접 드로잉** (`ImageFont.truetype` malgun/malgunbd + `anchor='mm'`,
rectangle/line/polygon 화살촉) → `그림_시간측점대응표.png` (2160×940) 재생성.
- PDF: fitz로 PNG 삽입, `deflate=True, garbage=4` 압축 (6MB → 52KB).
## 검증
- PNG 육안 검증: fps 디센더·한글 받침 모두 온전 ✅. 임시 파일(_z*, _zoom*) 정리.
## 파급 참고
- **본문 문서들의 인라인 SVG 그림도 weasyprint PDF에서는 동일하게 디센더가 잘릴 수 있음**
(HTML 보기는 브라우저 렌더라 정상). PDF 품질이 중요한 그림이 생기면 PIL 재렌더 방식 사용.
memory(report-doc-toolchain)에 기록함.