Comments (2)
Hi,
Could you please share your SVG file?
from cairosvg.
Apologies, I've since moved on but if it helps debug, an earlier commit where I applied it had the following template format that would generate the svg file:
<svg width="1200" height="628" viewBox="0 0 1200 628" fill="none" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700,700i");
</style>
<defs>
{% for author in authors -%}
<pattern id="pattern{{loop.index0}}" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image{{loop.index0}}" transform="scale(0.00159744)" />
</pattern>
<image id="image{{loop.index0}}" width="626" height="626" xlink:href="{{ author.img_path }}" />
{%- endfor %}
<clipPath id="clip0_8_48">
<rect width="1200" height="628" fill="white" />
</clipPath>
<clipPath id="clip1_8_48">
<rect width="257" height="51" fill="white" transform="translate(38 46)" />
</clipPath>
</defs>
...
{% for author in authors -%}
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Open Sans" font-size="20"
letter-spacing="0em">
<tspan data-count="{{author.count}}" x="{{ author.pos }}" y="510.61">{{ author.name|truncate(25, true) }}</tspan>
</text>
<circle cx="{{ author.circle }}" cy="519" r="57" fill="url(#pattern{{loop.index0}})" />
<text xml:space="preserve" style="white-space: pre" font-family="Open Sans" font-size="15"
letter-spacing="0em">
<tspan x="{{ author.pos }}" y="539.966" fill="darkgray">{{ author.job|truncate(25, true) }}</tspan>
<tspan x="{{ author.pos }}" y="561.966" fill="darkgray" font-style="italic">{{ author.dept|truncate(35, true) }}</tspan>
</text>
{%- endfor %}
</svg>
from cairosvg.
Related Issues (20)
- Failed to load CairoSVG in serverless program HOT 8
- closing the path for ellipse (and circle)? HOT 2
- `text` property `shape-inside` not respected HOT 1
- Convert to WebP HOT 1
- Add rlPyCairo to requirements.txt HOT 1
- Stroke Width is not taken into account for final height / width HOT 3
- OSE Error cairo-2 not found HOT 6
- Conversion of multiple files halted with error HOT 2
- SVG to PDF render improper PNG position HOT 1
- OSError: no library called "cairo-2" was found HOT 1
- RecursionError: maximum recursion depth exceeded in comparison HOT 1
- Truncating fractional height in pixels HOT 4
- svg2pdf incorrect width and height output - HOT 1
- Feature request: support style='background_color:xxxx' in the <svg> object
- Add support for blend modes
- Missing linked images and text HOT 6
- svg2png the stroke attribute causes display anomalies. HOT 1
- Fail of image path resolution in a defs/use context HOT 1
- SVG path parse error
- ValueError: could not convert string to float: 'null' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cairosvg.