Changing SVG density affect text scaling
See original GitHub issueI’m not sure if this is a bug or intended functionality but if I renderer the following SVG with different densities the text is scaled out of proportions.
If it’s intended, how do I create a text that can scale with the image?
<svg viewBox="0 0 100 24" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="#4CBB17"/><text xmlns="http://www.w3.org/2000/svg" x="50%" y="75%" font-size="100%" fill="#000000" text-anchor="middle" font-family="Arial,Helvetica">Fancy text</text></svg>
density: 72
density: 144
density: 288
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
How to Scale SVG | CSS-Tricks
Here, she shares an epic guide to scaling SVG, covering all the ways you ... the text inside to scale when you change...
Read more >SVG: fixed font size - Stack Overflow
The short answer is no. If the text is in an SVG with a viewBox , and the SVG gets scaled, its contents...
Read more >SVG scaling on import and export - MuseScore
SVG Export currently does no scaling relative to MuseScore::physicalDotsPerInch(). So, when you view the exported SVG in your browser or other ...
Read more >convert svg to png; font size changes with density - ImageMagick
BAD IDEA.. Specifying in pixels means you loose the ability to scale the image for different densities. The problem sounds like the SVG...
Read more >T36947 Incorrect text positioning in SVG rasterization (scale ...
I don't know if it is relevant, but the Bosch Composition.svg text was stroked. Stroked text can grow or shrink depending on the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
sharp v0.22.0 now available, providing libvips v8.7.4 and librsvg v2.45.5.
+1