render: replay equations in native Skia PNG output#626
Open
seo-rii wants to merge 3 commits intoedwardkim:develfrom
Open
render: replay equations in native Skia PNG output#626seo-rii wants to merge 3 commits intoedwardkim:develfrom
seo-rii wants to merge 3 commits intoedwardkim:develfrom
Conversation
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.
변경 요약
이번 PR은 P4에서 들어간 native Skia PNG 렌더링 경로에 수식 replay를 추가합니다.
P4까지는
PaintOp::Equation이 native Skia 경로에서 placeholder 박스로만 그려졌는데, 이 PR에서는 기존 equation layout tree(EquationNode.layout_box)를 Skia canvas에 직접 replay하도록 바꿉니다. 그래서render_page_png_native나export-png처럼 native Skia PNG 경로를 타는 출력에서 수식이 빈 박스처럼 빠지지 않습니다.구현 범위는 일부러 좁게 잡았습니다.
src/renderer/skia/equation_conv.rs를 추가해서 equation layout node를 Skia draw call로 변환합니다.PaintOp::Equation처리에서EquationNode.layout_box를 사용하고, bbox 폭 차이가 있을 때는 x축 scale로 맞춥니다.#599에서
export-png와 VLM/Vision 쪽 사용 흐름이 들어왔기 때문에, 이 PR은 그 PNG 출력 품질을 바로 보강하는 성격입니다. 다만 #613 같은 VLM preset 확장이나 #614 DPI metadata는 이 PR 범위에 넣지 않습니다.관련 이슈
테스트
cargo test --features native-skia skia --lib통과cargo clippy --features native-skia --lib -- -D warnings통과cargo clippy -- -D warnings통과cargo check --target wasm32-unknown-unknown --lib통과cargo test통과스크린샷
없음.
이 PR은 native Skia raster backend 내부 replay 보강이고, 테스트는 수식이 placeholder가 아니라 실제 colored ink로 렌더링되는지 확인하는 방식으로 추가했습니다.