Code Monkey home page Code Monkey logo

svg2png-wasm's Issues

CI/CDの修正

手元だと動くけどGitHub Actionsだと失敗するテストになってる。

ついでに、リリースフローの見直し(semantic-release?)、Jest->Vitestなど

ライセンスの検討

現在は resvg および usvg のライセンスからMPL-2.0をこのライブラリのライセンスに適用していたが、

MPL 2.0 FAQ

によれば、MPL部分を入手する方法を明記すれば他のライセンスでもよいとしていることがわかった。
(実際、自身で書いたソースコードにMPLを適用していないので名ばかりのMPLライセンスになっている)

WASM内に入手方法を書くことは困難であるため(バンドルされた)JSコードおよびREADMEに記述する。

肝心なこのライブラリのライセンスについてはMIT/Apache 2.0/BSDあたりから検討する。

Text rendering does not seem to work in the online demonstration

I tried the online version with the following svgs that have text:

  <svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">
     <text x="20" y="40">Example SVG text 1</text>
</svg>
<svg width="1200" height="1200" viewBox="0 0 1200 628" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="backgroundGradient" x1="0" y1="0" x2="1" y2="1"><stop offset="0%" stop-color="black"></stop><stop offset="100%" stop-color="#3a2fa6"></stop></linearGradient><rect width="100%" height="100%" fill="url(#backgroundGradient)"></rect><text text-anchor="start" font-family="Roboto" font-size="140" fill="#d239f6"><tspan x="80" y="200">Future Frontend</tspan></text><text text-anchor="start" font-family="Roboto" font-size="80" fill="#d239f6"><tspan x="80" y="340">Demo</tspan></text><text text-anchor="start" font-family="ui-sans-serif, system-ui" font-size="40" font-weight="200" fill="white"><tspan x="80" y="440">The future of frontend reimagined</tspan></text><text text-anchor="start" font-family="ui-sans-serif, system-ui" font-size="40" font-weight="200" fill="white"><tspan x="80" y="520">5.6-9.6.2023</tspan></text><text text-anchor="start" font-family="ui-sans-serif, system-ui" font-size="40" font-weight="200" fill="white"><tspan x="380" y="520">Pörssitalo, Helsinki, Finland</tspan></text></svg>

For some reason, both fail to render the text portions. Note that the gradient shows up just fine in the latter example.

I was also able to reproduce the same behavior locally with a Cloudflare worker and I can share the code if that helps.

Embedded Fonts Not Rendering

I'm using the package in a CloudFlare worker and running into issues with rendering embedded fonts.

Example SVG:
6040c18b5322b032e7a392c41bbb75a8

Note that the font is embedded using a data uri.

Output:
6040c18b5322b032e7a392c41bbb75a8

resvg v0.20.0

リリースされてたので、更新・追従する

デモページ

GitHub Pagesで動くサンプルを公開したい(建前)
自分がお手軽にSVG->PNGできるようにしたい(本音)

readme カイゼン

  • demo pageへの誘導
  • サンプルコードのリファクタリング
  • createSvg2png と svg2png の説明

Does it support images in svg?

I tried to convert a svg that contains image tag, but the images are gone in resulting png, regardless of if they are referenced by href url or base64 string.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.