lovell / lovell/sharp

SVG with embedded font

Open
#2,838 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

blocked-upstream-dependency
Dominant language
JavaScript
Stars
32.7k
Forks
1.4k
Avg merge
1d 14h
Merged PRs (30d)
5

Description

**Are you using the latest version? Is the version currently in use as reported by `npm ls sharp` the same as the latest version as reported by `npm view sharp dist-tags.latest`?**

Yes, sharp@0.28.3

**What are the steps to reproduce?**

[sample.svg.zip](https://github.com/lovell/sharp/files/6973364/sample.svg.zip)
[sample.png](https://user-images.githubusercontent.com/20903247/129151483-9880b3b1-bce3-44b0-b963-091bf590c720.png)

**What is the expected behaviour?**

Convert the svg to png

**Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?**

Yes, run the sample svg image through sharp, but receive a blank png.

**Are you able to provide a sample image that helps explain the problem?**

Yes, please see the svg and expected png above. Unfortunately, sharp returns a blank png.

**What is the output of running `npx envinfo --binaries --system`?**

```
System:
OS: macOS 10.15.7
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 88.28 MB / 64.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.17.0 - ~/.asdf/installs/nodejs/14.17.0/bin/node
Yarn: 1.22.10 - ~/.asdf/shims/yarn
npm: 7.19.0 - ~/.asdf/installs/nodejs/14.17.0/.npm/bin/npm
Watchman: 2021.06.07.00 - /usr/local/bin/watchman
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the blank PNG from sample.svg.zip with sharp@0.28.3 and compare it with sample.png. Trace SVG rendering and embedded-font handling in sharp and its image-processing dependency; done means the supplied SVG converts to a PNG containing the expected rendered content, with regression coverage for the case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.