Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG text is not rendered properly #1585

Open
petaflot opened this issue Sep 25, 2024 · 2 comments
Open

SVG text is not rendered properly #1585

petaflot opened this issue Sep 25, 2024 · 2 comments

Comments

@petaflot
Copy link

text that is centered and/or wrapped is not displayed properly.

shotcut0
shotcut1

@ddennedy
Copy link
Member

ddennedy commented Sep 25, 2024

You did not provide your OS and Shotcut version. You also did not include your SVG.

Shotcut uses Qt library via MLT to render SVG, and Qt only supports non-animated SVG 1.2 Tiny, which you can read about here. I do not modify the Qt included in our builds or work on Qt myself. Inkscape is not limited to SVG 1.2 Tiny.

SVG has problematic interoperability because it is complex, interpreted, and has many versions. So, it is generally not a reliable format. You can read more about versions on Wikipedia.

Complex multimedia formats work best when you have more control over both the authoring tool and rendering engine. Therefore, I recommend using Glaxnimate (bundled in our builds) for vector graphics that can also be animated.

@petaflot
Copy link
Author

currently running Shotcut 24.09.22 on Gentoo (profile: default/linux/amd64/23.0/desktop)

I understand how SVG could be rendered differently by different backends.

Here is the SVG file (I added some complexity that shows other variations of the problem) with some screenshots. Text in top rectangle: multi-line, centered text. Text in bottom rectangle: two single lines, left aligned. There is no animation.

presents_2
1
2

Since a user is likely to use a single editor for SVG (in my case, inkscape), and since most programs insert clues in the SVG document that allows one to know which program was used to create the SVG, I suppose it shouldn't be too hard to use the same program to render the document (either by user config or dynamically based on the file's content).

For now, I will export manually and insert a PNG instead of the SVG. it's as easy as inkscape --export-type="png" my_svg.svg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants