adobe / adobe/svg-native-viewer

Incorrect viewbox translate

Open
#115 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
164
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Given these two images:
1.
```

```

2.
```

```
Chrome renders these images correctly, that is a character of "f". However, svg-native-viewer failed to render the later one (result is blank image.).

I think it's because of translation and scale are applied inverted here:
https://github.com/adobe/svg-native-viewer/blob/1901c27b85e66809144e94b4de86f5b181158b1e/svgnative/src/SVGDocumentImpl.cpp#L968-L969

Contributor guide

Open the contributing guide

Research direction

Start in svgnative/src/SVGDocumentImpl.cpp around lines 968-969, then compare the transforms and viewBox values in the two SVG examples. Reproduce the blank rendering with the later SVG and verify that both examples render the character “f” correctly when the transform handling is fixed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.